linux修改账号密码后,密码正确一直登录不了,查看secure日志
tail -f /var/log/secure
发现登录时日志显示以下内容:
Jan 10 09:18:56 localhost sshd[20487]: pam_tally2(sshd:auth): user yww (1002) tally 20, deny 6
Jan 10 09:18:58 localhost sshd[20487]: Failed password for yww from 10.139.93.3 port 48234 ssh2
Jan 10 09:19:02 localhost sshd[20487]: Connection closed by 10.139.93.3 port 48234 [preauth]
原来是密码不小心错误超过次数被限制了,使用下面命令清除密码错误计数,或者等待时间限制解除
pam_tally2 --user 用户名 --reset