LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Block a user account some time (http://www.linuxquestions.org/questions/linux-newbie-8/block-a-user-account-some-time-817230/)

kopper27 06-30-2010 03:11 PM

Block a user account some time
 
hi guys

I have Centos 5.4

The idea is lock the user account for 3 minutes after he has entered his password incorrectly 3 times.

I've modified /etc/pam.d/system-auth
Code:

auth        required      pam_tally.so onerr=fail per_user deny=3
account    required      pam_tally.so reset

besides the code above I used these 2 commands to get things working

Set lock out at 3 failed login attempts:
faillog -m 3
Exclude root from this lockout mechanism:
faillog -u root -m 0


as you see I have not defined the lock_time=180 yet since no matter where I put it up there it won't work

where should it be? in order that after 3 or more failed attempts and after wait 3 minutes user can log to the system since for instance he now remember his correct password

Now I can unblock his account manually by faillog -r -u username but I want to avoid that admin task

thanks a lot

Tinkster 06-30-2010 04:00 PM

I can recommend a read of the relevant man-pages, since they're
commonly up to date, while the howtos have a limited shelf-life.



Cheers,
Tink


All times are GMT -5. The time now is 09:00 PM.