LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   how can i as the root know what is the last account logged in this computer (http://www.linuxquestions.org/questions/linux-software-2/how-can-i-as-the-root-know-what-is-the-last-account-logged-in-this-computer-577752/)

Muhammed 08-17-2007 06:29 AM

how can i as the root know what is the last account logged in this computer
 
how can i as the root know what is the last account logged in this computer

devnull0 08-17-2007 06:32 AM

Try lastb. It shows the last person logged in to the computer, but only if /var/log/btmp exists. If it doesn't, do a 'touch /var/log/btmp'.

livetoday 08-17-2007 06:36 AM

You can also try last...based on /var/log/wtmp

Quote:

Originally Posted by devnull0 (Post 2861851)
Try lastb. It shows the last person logged in to the computer, but only if /var/log/btmp exists. If it doesn't, do a 'touch /var/log/btmp'.


unSpawn 08-17-2007 07:33 AM

To clear that up: 'last' shows all user login/outs, 'lastb' shows bad login attempts.


All times are GMT -5. The time now is 05:26 AM.