项目场景:
Linux修改密码成功,却无法登录
问题描述
等保服务器密码过期后,修改密码,登录显示密码错误,后台vnc修改密码后,新密码无法登录
使用passwd修改密码
[root@localhost ~]# passwd admin
Changing password for user admin.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
显示密码修改成功,但是无法登录
原因分析:
查看secure日志
tail -f /var/log/secure
显示:
Nov 16 09:20:13 xxxxx sshd[11450]: pam_tally2(sshd:auth): user admin (1003) tally 47, deny 5
Nov 16 09:20:13 xxxx sshd[11450]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxxxxx user=admin
Nov 16 09:20:15 xxxxx sshd[11450]: Failed password for admin from xxxxx port 59485 ssh2
Nov 16 09:20:23 xxxxx sshd[11450]: pam_tally2(sshd:auth): user admin (1003) tally 48, deny 5
Nov 16 09:20:25 xxxxx sshd[11450]: Failed password for admin from xxxx port 59485 ssh2
Nov 16 09:20:46 xxxxx sshd[11450]: pam_tally2(sshd:auth): user admin (1003) tally 49, deny 5
Nov 16 09:20:48 xxxxx sshd[11450]: Failed password for admin from xxxxxxx port 59485 ssh2
密码错误超过次数被限制了!文章来源:https://www.toymoban.com/news/detail-647072.html
解决方案:
使用如下命令,清除密码错误次数,或者等待时间限制解除文章来源地址https://www.toymoban.com/news/detail-647072.html
pam_tally2 --user 用户名 --reset
到了这里,关于Linux修改密码成功,却无法登录的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!