LinuxQuestions.org
Help answer threads with 0 replies.
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 02-19-2009, 04:18 PM   #1
lvlr
LQ Newbie
 
Registered: Feb 2009
Posts: 6

Rep: Reputation: 0
Login Times for Users


How would I access Log In Times for users? If I use the command users I I get the current users but just their names. If I could get the current users and their login time that would be awesome. If I could get their IP address that would be really, really awesome!
 
Old 02-19-2009, 04:36 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Code:
$ who
colucix     :0           2009-02-19 18:40 (console)
colucix     pts/0        2009-02-19 18:40
colucix     pts/1        2009-02-19 22:44
pippo       pts/2        2009-02-19 23:05 (192.168.0.11)
 
Old 02-19-2009, 04:36 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,216

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
another command to try would be 'last'
current users would show as 'still logged in'
as such
Code:
root     pts/3        :0.1             Thu Feb 19 14:43   still logged in   
root     pts/2        :0.0             Thu Feb 19 13:59   still logged in   
root     pts/1        :0.0             Thu Feb 19 13:37   still logged in   
root     pts/0        :0.0             Thu Feb 19 10:33 - 13:59  (03:25)    
root     :0                            Thu Feb 19 10:32   still logged in   
root     tty1                          Thu Feb 19 10:29   still logged in   
reboot   system boot  2.6.27.15-170.2. Thu Feb 19 10:28          (06:16)    
root     pts/1        :0.1             Thu Feb 19 01:01 - down   (08:54)    
root     pts/0        :0.0             Wed Feb 18 23:43 - down   (10:12)    
root     :0                            Wed Feb 18 23:27 - down   (10:28)    
reboot   system boot  2.6.27.12-170.2. Wed Feb 18 23:26          (10:29)    
root     pts/0        :0.0             Wed Feb 18 11:35 - down   (11:05)

Last edited by frieza; 02-19-2009 at 04:38 PM.
 
Old 02-19-2009, 05:06 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by lvlr
If I could get the current users and their login time that would be awesome. If I could get their IP address that would be really, really awesome!
The w(1) command should answer those questions as well.
 
Old 02-19-2009, 11:51 PM   #5
lvlr
LQ Newbie
 
Registered: Feb 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the help guys!

Thanks for the help guys! That worked great!
 
  


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
Login Times for Users lvlr Linux - Software 1 02-19-2009 04:29 PM
Auto-login at specific times Vorik Linux - Software 6 12-11-2007 01:04 AM
Login times Radical Edward Linux - Newbie 2 12-01-2004 10:39 PM
Logging off and locking out users at specific times Kahless Linux - Software 5 02-19-2004 01:21 PM
Need to restrict login times for vsftp thebrit123 Linux - Software 0 06-09-2003 09:27 AM


All times are GMT -5. The time now is 11: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