Tuesday, July 3, 2007

last / currently logged in users

here are several ways of knowing the last logged in users from your box. most of them shows similar details like username, date stamp, hostname, ip address and the like:

Individually issuing them as root :

#last -a
#lastb -a
#lastb username
#lastb username

So, who is currently logged in?

#who -a

Some dirty roots:

#ps axuw | grep bash
#ps axuw | grep bash | awk '{print $1}'

(since by default the default drop shell is bash)

Sideslide, if you have freeradius currently running, the below will show you the currently authenticated users from freeradius:

#radwho -r

Who are you?




Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy