auth required pam_tally2.so file=/var/log/tallylog deny=3 even_deny_root unlock_time=1200
account required pam_tally2.so
- file=/var/log/tallylog – Default log file is used to keep login counts.
- deny=3 – Deny access after 3 attempts and lock down user.
- even_deny_root – Policy is also apply to root user.
- unlock_time=1200 – Account will be locked till 20 Min. (remove this parameters if you want to lock down permanently till manually unlock.)
check the counter that user attempts with the following command.
# pam_tally2 --user=john
How to reset or unlock the user account to enable access again.
# pam_tally2 --user=john --reset
Verify login attempt is reset or unlocked
# pam_tally2 --user=john
No comments:
Post a Comment