LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Login Times for Users (https://www.linuxquestions.org/questions/linux-newbie-8/login-times-for-users-706018/)

lvlr 02-19-2009 04:18 PM

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!

colucix 02-19-2009 04:36 PM

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)


frieza 02-19-2009 04:36 PM

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)


anomie 02-19-2009 05:06 PM

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.

lvlr 02-19-2009 11:51 PM

Thanks for the help guys!
 
Thanks for the help guys! That worked great!
:)


All times are GMT -5. The time now is 02:26 PM.