2012-07-17

LINUX - ssh login 時, 發生 Account locked due to 21 failed logins

ssh login 時發生 Account locked due to 21 failed logins 的訊息
看起來是密碼輸入錯誤太多次了


解決方式 : 以 root 登入該 server 後, 執行下行即可
 faillog -r -u username

這個 rule 定義在
/etc/pam.d/system-auth
(但我在 suse 下只找到 /etc/pam.d/login)

其他相關參數


To display all failed login attempts, type:
faillog -a

To display failed logins for a particular user, type:
faillog -u username

To unlock a username after their maximum number of login attempts, type:
faillog -r -u username

To manually lock an account, use the “passwd” command:
passwd -l username

To unlock the account:
passwd -u username


cf :
http://www.serverschool.com/server-configuration/how-to-lock-user-accounts-after-login-failure/
http://www.cyberciti.biz/tips/lock-unlock-set-number-of-login-attempts.html

沒有留言:

張貼留言