ssh: 用户不允许 shell 不存在

Apache

CentosOS 5

Plesk 10

在命令行和新的新功能 ssh.

在尝试连接多个用户时 /root git friend/ 到 ssh 到同样的情况 shell 和配置连接而无需密码,我必须犯了一个错误。

我更多

我不能进入 ssh 作为 root

或者 git, 但我可以喜欢一个朋友 shell 我通过编辑传达 etc/passwd.
幸运的是,我仍然可以登录系统 plesk, 所以编辑文件 gui 可能。

这就是我在我的杂志错误中找到的东西 sshd


sshd[11999]: User git not allowed because shell /bin/bash\r does not exist
sshd[12000]: input_userauth_request: invalid user git
sshd[11999]: pam_unix/sshd:auth/: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxx.xxx.xxx.dynamic.upc.nl user=git
sshd[11999]: Failed password for invalid user git from xxx.xxx.xxx port 54851 ssh2


我读了一些事情 sudo ing 随机入口:造成 \r
但在哪里恢复?
以下是一些配置

etc/ssh/sshd_config :


PubkeyAuthentication yes


在ess./贝壳


/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/false
/usr/local/psa/bin/chrootsh
/bin/rbash


等等。/密码


git:x:10009:10009::/home/git:/bin/bash
friend:x:10010:10010::/home/git:/bin/bash


早些时候我试图在没有连接的情况下安装密码
, 所以在服务器上的某个地方和我的本地机器上有一个文件 .ssh/id_rsa.

看完之后
https://coderoad.ru/5335197/
我试过了


ssh-add -l
Could not open a connection to your authentication agent


我的问题与此类似:
https://serverfault.com/questi ... shell
如果我通过了通过 ssh 作为朋友,我不能 sudo root:


sudo root 
friend is not in the sudoers file


我不能chsh


[friend@vpsXXX ~]$ chsh -s /bin/bash root
chsh: Running UID doesn't match UID of user we're altering, shell change denied


希望有人可以为我澄清一下。

如有必要,我很乐意提供额外的信息
已邀请:

江南孤鹜

赞同来自:

/bin/bash\r


意味着您已被编辑 /etc/passwd 或者 /etc/shells 使用编辑器 Windows, 因为它包含 Windows 学期
\r\n

. Linux 只解释
\n

并假设剩下的
\r

它是二进制名称的一部分。

解决方案:在编辑器中打开文件 Linux, 删除新字符串并再次添加它。

您还可以安装包。
tofrodos

并执行:


fromdos /etc/passwd
fromdos /etc/shells

要回复问题请先登录注册