Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-30-2010, 04:11 PM   #1
Registered: Nov 2009
Posts: 147

Rep: Reputation: 16
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

Last edited by kopper27; 06-30-2010 at 04:21 PM.
Old 06-30-2010, 05:00 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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.

0 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does connect() block for a long time? dwhitney67 Programming 3 03-04-2009 07:46 PM
LXer: psad: Linux Detect And Block Port Scan Attacks In Real Time LXer Syndicated Linux News 0 08-12-2008 03:40 PM
SUDO - allow user joe to SU to usera sajjad02 Linux - Newbie 1 03-10-2005 02:25 PM
How to allow userA to su another user satimis Red Hat 3 07-05-2004 10:40 AM
U.S. Preparing to Block AOL-Time Warner Deal jeremy General 0 10-15-2000 02:01 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration