Tuesday, 29 November 2016

pam_tally2 command – lock & unlock ssh failed logins



Check users login attempts using pam_tally2 command:

[root@linuxcnf ~]# pam_tally2 --user=user1
Login           Failures       Latest failure            From
user1                  7        11/29/16 01:45:56  192.168.10.18

Now reset or unlock user’s accounts using pam_tally2 command:

[root@linuxcnf ~]# pam_tally2 --user=user1 --reset
Login           Failures       Latest failure            From
user1                  8        11/29/16 01:49:15  192.168.10.18

Now Verify the login Attempts is reset or not:

[root@linuxcnf ~]# pam_tally2 --user=user1
Login           Failures        Latest failure            From
user1                  0

Now you can able to login!!!

No comments:

Post a Comment