-   Linux - Newbie (
-   -   Block a user account some time (

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

auth        required onerr=fail per_user deny=3
account    required 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.


All times are GMT -5. The time now is 05:22 PM.