LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-26-2010, 05:55 AM   #1
DorsetBlue
LQ Newbie
 
Registered: Jan 2010
Posts: 15

Rep: Reputation: 1
Display of number of failed logon attempt...at logon


Hi,

Our system is based on RH4 and is using pam_tally and faillog to record failed attempts and to lock users out after 5 attempts.

We have a requirement to provide a normal (non-root) user logging onto our system, with information regarding the number of failed logon attempts made on their account before the current successful logon (similar to the functionality provided by HP Protect Tools on Windows).

My first idea was to add 'faillog -u $USER' to the bashrc, however by the time the bashrc is run - the user has been successfully authenticated and the faillog has been reset back to zero.

I have been googling for several hours and have failed to find any ways to provide this functionality, can anyone suggest some ideas?
 
Old 01-26-2010, 07:05 AM   #2
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
I guess sshd's ForceCommand isn't working?
Then only idea i have is to run a crontab script, that will collect and dump this table in some file every x minutes and on-login it will be read with grep for $USER.
 
Old 01-26-2010, 07:22 AM   #3
DorsetBlue
LQ Newbie
 
Registered: Jan 2010
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Web31337 View Post
I guess sshd's ForceCommand isn't working?
Then only idea i have is to run a crontab script, that will collect and dump this table in some file every x minutes and on-login it will be read with grep for $USER.
This is for local logon, not through ssh.

Yes, the cron option was the only one I had come up with so far.
 
Old 01-26-2010, 08:08 AM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Try this in your /etc/login.defs file:
Code:
FAILLOG_ENAB            yes
 
Old 01-26-2010, 09:27 AM   #5
DorsetBlue
LQ Newbie
 
Registered: Jan 2010
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by win32sux View Post
Try this in your /etc/login.defs file:
Code:
FAILLOG_ENAB            yes
Okay, that now displays the time that the user last logged in (actually that is handy as well - so thanks for that) but does not detail the number of failed login attempts.
 
Old 01-26-2010, 09:47 AM   #6
DorsetBlue
LQ Newbie
 
Registered: Jan 2010
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by DorsetBlue View Post
Okay, that now displays the time that the user last logged in (actually that is handy as well - so thanks for that) but does not detail the number of failed login attempts.
I have tried adding LASTLOG_ENAB yes as well but that made no additional difference.

Running man login.defs does not list either the FAILLOG_ENAB nor LASTLOG_ENAB options, so perhaps the version of RH4 we are using does not support these options?
 
  


Reply



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
Security settings - Account lockout – Number of bad logon attempts dwarf007 Linux - Security 1 04-19-2008 12:22 AM
Setting for Number of Logon Failures and Action after that? as400 Solaris / OpenSolaris 3 07-22-2007 10:56 AM
window xp logon failed alris Linux - Networking 1 08-04-2003 09:05 AM
windows xp logon failed. alris Linux - General 1 08-04-2003 07:00 AM
restrict number of logon attempts depaul Linux - Security 5 07-28-2003 12:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration