Sharing Knowledge | System Admin Articles

Reset Failed Login Count in Linux



Depends on the PAM configuration on Linux server, the Pluggable Authentication Module (PAM)

To check the login attempts to see if it needs to be reset type faillog -u <username>
[email protected]:~ # faillog -u user1
Username Failures Maximum Latest
user1       15        0
Reset the counter with the -r flag:
[email protected]:~ # /usr/bin/faillog -r user1
Username Failures Maximum Latest
user1        0        0
If you’re root but is not managing to become a user with su, you also need to reset the login counter:
[email protected]~ # su – username
su: incorrect password
[email protected]:~ # /sbin/pam_tally —-user user1 —-reset
User user1 (672) had 34
[email protected]:~ # su – username
[email protected]:~ $


Labels: Linux, Quick HOWTO

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

1 Comments for "Reset Failed Login Count in Linux"

I really prize your work, Great post.

What do you think about this Article? Add your Opinion..!

Back To Top