I have set up PAM Authentication to lock a user accoount after 3 attempts of incorrect password.
PAM Module: pam_tally2.so
password-auth-ac:
=============
auth required pam_tally2.so deny=3 file=/var/log/tallylog
account required pam_tally2.so
PAM Module: pam_tally2.so
password-auth-ac:
=============
auth required pam_tally2.so deny=3 file=/var/log/tallylog
account required pam_tally2.so
[root@node1 /]# pam_tally2 --user test
Login Failures Latest failure From
test 0
[root@node1 /]#
login as: test
test@192.168.183.148's password:
Access denied
test@192.168.183.148's password:
Access denied
test@192.168.183.148's password:
Access denied
test@192.168.183.148's password:
Access denied
test@192.168.183.148's password:
Account locked due to 4 failed logins
Account locked due to 5 failed logins
Account locked due to 6 failed logins
Account locked due to 7 failed logins
Last login: Sun Jun 15 00:14:30 2014 from 192.168.183.1
[test@node1 ~]$
[root@node1 /]# pam_tally2 --user=test
Login Failures Latest failure From
test 6 06/15/14 00:23:20 192.168.183.1
[root@node1 /]# pam_tally2 --user=test --reset
Login Failures Latest failure From
test 6 06/15/14 00:23:20 192.168.183.1
[root@node1 /]# pam_tally2 --user=test
Login Failures Latest failure From
test 0
[root@node1 /]#
login as: test
test@192.168.183.148's password:
Last login: Sun Jun 15 00:20:07 2014 from 192.168.183.1
[test@node1 ~]$ whoami
test
[test@node1 ~]$
No comments:
Post a Comment