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 10-16-2007, 05:08 PM   #1
CP1
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
show last sucessful and faile login after login


I want to display last successful login and last failed attempt after a user login successfully.
I already put pam_lastlog.so in my /etc/pam.d/login but it only shows the last time the user did a login successfully.
Can anyone help?
 
Old 10-16-2007, 06:53 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
What's the real requirement for showing *failed* attempts? That's nfo only the root account user should be interested in to audit system access with. What could a *user* do with that information (except abuse it)?
 
Old 10-17-2007, 02:02 PM   #3
CP1
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
for example, with the time of the last failed login, the user will know if someone is trying to access with is login.
 
Old 10-17-2007, 03:56 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
I still maintain that's the *admin's* task, but OK... "faillog -u $USERNAME | head -1" should give you the last failed login entry for $USERNAME (if defined). However that does not mean it would be close to the time $USERNAME logs in again (unless you put a grep behind it). I don't know of a PAM module that would give you "pam_faillog" so you could use a script like "pam_script"?

Last edited by unSpawn; 10-17-2007 at 03:59 PM.
 
  


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
Command to show who login to my server micro_xii Linux - Newbie 4 12-20-2006 07:57 PM
Show Login Screen on SuSE 9.2 Zakirium Linux - Newbie 2 01-17-2006 02:44 PM
show last users login wisdom Programming 3 11-17-2005 03:56 AM
Apache, to show login user stomach Linux - Software 2 09-09-2005 08:54 PM
show motd on login pirozzi Debian 11 12-15-2004 11:40 AM


All times are GMT -5. The time now is 04:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration