LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how can I know which user has logged in? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-know-which-user-has-logged-in-724647/)

your_shadow03 05-08-2009 07:24 AM

how can I know which user has logged in?
 
What command is used to know which users are currently logged in the server?
I ran w command but it doesnt hint for the same?
I ran lsof command to know open operations but still clueless in understanding the o/p.

sarin 05-08-2009 07:34 AM

"who" or "w" or "finger" should have told you the same. What is that you get when you try those commands?

harry edwards 05-08-2009 07:47 AM

Along with those already suggested the "last" command may be of use.

Lee_Ball 05-08-2009 08:47 AM

Also, knowing how they login would help too. If they are accessing files using Samba for example, then smbstatus would show you that information.

I can recommend the last command though:

last | grep "still logged in"

Will show you who is currently logged in but it also shows you which terminal windows you have open, and if you're su'd to root etc.

malekmustaq 05-08-2009 09:08 AM

your_shadow03:

Above query commands provide plenty of information.

But if you want a simple print of who are currently logged in just type

$ users <Enter>

hope this helps.


All times are GMT -5. The time now is 01:29 AM.