如何设置linux密码错误锁定时间

授权登录限制

vi /etc/pam.d/system-auth

添加

auth required pam_tally2.so deny=3 unlock_time=30 even_deny_root root_unlock_time=60 

sshd登录错误限制

vim /etc/pam.d/sshd

添加

auth required pam_tally2.so deny=3 unlock_time=30 even_deny_root root_unlock_time=60 
原文地址:https://www.cnblogs.com/jiqing9006/p/14735552.html