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
#lastb username
#lastlog

So, who is currently logged in?

#who
#who -a
#w

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
#radwho

Who are you?

#whoami

cheers

0 comments:

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