How to clear user unsuccessful login count in RHEL?

 

Sometimes we use to receive a complaints from the users, after their password reset also they’re unable to login into the server.

In this case, we need to clear the user unsuccessful login count on the server end. How?

See below,

The user john is unable login into the server after receiving a new password from his admin. The problem is john’s unsuccessful login count is not cleared.

To do the same, need to use pam_tally2 command with the -r flag.

 

[root@Server~]# pam_tally2 --user=john
Login           Failures Latest failure     From
john            8                           mywindows.example.com
[root@Server~]#
[root@Server~]# pam_tally2 --user=john -r
Login           Failures Latest failure     From
john            8                           mywindows.example.com
[root@Server~]#
[root@Server~]# pam_tally2 --user=john
Login           Failures Latest failure     From
john            0                           mywindows.example.com
[root@Server~]#

 

Related posts

Leave a Comment