LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 06-30-2010, 03:11 PM   #1
kopper27
Member
 
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
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

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

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
0 members found this post helpful.
  


Reply


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 06:46 PM
LXer: psad: Linux Detect And Block Port Scan Attacks In Real Time LXer Syndicated Linux News 0 08-12-2008 02:40 PM
SUDO - allow user joe to SU to usera sajjad02 Linux - Newbie 1 03-10-2005 01:25 PM
How to allow userA to su another user satimis Red Hat 3 07-05-2004 09:40 AM
U.S. Preparing to Block AOL-Time Warner Deal jeremy General 0 10-15-2000 01:01 PM


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

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