在centos中通过ssh登录拒绝访问

时间:2016-05-26 12:11:11

标签: centos root denied

我想更改root用户名,但最后我遇到了一个大问题!

现在我无法使用root用户名和密码访问服务器

首先:我有一个ping 第二:directadmin是好的http服务还可以 第三:所有网站都可以 / etc / shadow和/ etc / passwd看似没问题!但我觉得有一些错误! 这些命令回答 root @ rescue:〜#tail -1 / etc / passwd 代码:

rootftp:x:0:0:root:/mnt:/bin/nologin

root @ rescue:〜#tail -l / etc / shadow 代码:

systemd-timesync:*:16567:0:99999:7:::
systemd-network:*:16567:0:99999:7:::
systemd-resolve:*:16567:0:99999:7:::
systemd-bus-proxy:*:16567:0:99999:7:::
uuidd:*:16567:0:99999:7:::
ftp:*:16567:0:99999:7:::
ovh:f1iXm9JFloDhE:16947:0:99999:7:::
statd:*:16729:0:99999:7:::
sshd:*:16737:0:99999:7:::
rootftp:*:12856:0:99999:7:::

现在我想插入救援磁盘和 检查有关预设的sshd服务,并通过passwd

更改root密码

我再也不能去ssh root服务了

现在我不能使用ftp ans sftp而我无法通过端口22和21转到服务器

我该如何解决这个问题?

这是救援小组内的日志消息

代码:

May 26 13:15:10 rescue kernel: random: systemd urandom read with 74 bits of entropy available
May 26 13:15:10 rescue kernel: random: nonblocking pool is initialized
May 26 13:15:10 rescue rsyslogd-2007: action 'action 17' suspended, next retry is Thu May 26 13:15:40 2016 [try http://www.rsyslog.com/e/2007 ]
May 26 13:15:11 rescue mpt-statusd: detected non-optimal RAID status
May 26 13:22:57 rescue kernel: nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
May 26 13:22:57 rescue kernel: ip_set: protocol 6
May 26 13:23:34 rescue kernel: ip_set: protocol 6
May 26 13:23:39 rescue kernel: ip_set: protocol 6
May 26 13:25:11 rescue mpt-statusd: detected non-optimal RAID status
May 26 13:35:11 rescue mpt-statusd: detected non-optimal RAID status

1 个答案:

答案 0 :(得分:0)

这里的pb是你改变了shell!

rootftp:X:0:0:根:/ MNT:的 / bin中/ nologin的

你必须输入类似“/ bin / bash”的内容

rootftp:X:0:0:根:/ MNT:的 /斌/庆典