LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-27-2004, 12:58 AM   #1
RajaRC
Member
 
Registered: Feb 2003
Distribution: Redhat
Posts: 58

Rep: Reputation: 15
Event logging


Hi

I have a Redhat linux Server.

I would like to configure it in such a way that it displays the last login and logout date and time for a particular when he login to the system.

Currently it displays the last login time and date, but not logout.

Please let me know how to configure it to display both.

Regards
 
Old 10-27-2004, 08:18 AM   #2
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
I think a lot of that information may be stored in /var/log/wtmp. However, I'm not that familiar with parsing through wtmp to make any useful information. A script-based way to obtain information is by using the last <username> commandl and then yank out the info you need. For instance, when I type in last neil from the command prompt of one of my servers, I get this:
Code:
neil     pts/198      h10-215-220-46.  Tue Oct 19 15:15 - 16:56  (01:41)
neil     pts/197      h10-215-220-46.  Tue Oct 19 14:33 - 14:58  (00:24)
Username, terminal, hostname I connected from, Date/time when I connected through when I disconnected, and lastly my duration in (HH:MM) format.
 
Old 10-28-2004, 12:59 AM   #3
RajaRC
Member
 
Registered: Feb 2003
Distribution: Redhat
Posts: 58

Original Poster
Rep: Reputation: 15
Thankyou Niel

Regards
 
  


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
Event Capturing rem1986 Linux - General 2 12-13-2005 12:11 PM
Timer Event wallwaters Linux - Software 1 05-26-2005 09:46 PM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 02:55 AM
Event Sounds.. jhorvath Slackware 2 10-01-2002 04:13 PM
New IP address event ? krumholz Linux - Networking 2 08-01-2002 12:02 PM


All times are GMT -5. The time now is 06:48 AM.

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