22 March 2014

Reset failed logins for a locked user in linux


Q: You are trying to login to a server but you face following message:

"Account locked due to 7 failed logins"

A: It's due to multiple failed logins and you need to reset the failed logins counter.


1. Check number of failed logins:

# pam_tally2 -u user1 -r 
Login    Failures    Latest failure    From 
user1      5         06/18/13 11:24:15 10.15.62.121


2. Reset the failed logins counter with -r option:

# pam_tally2 -u user1 -r 
Login    Failures    Latest failure    From 
user1      5         06/18/13 11:24:15 10.15.62.121

3. Issue the command again to verify:

# pam_tally2 -u user1 
Login    Failures    Latest failure    From 
user1      0          





No comments:

Post a Comment