Click to See Complete Forum and Search --> : View the Users


hisham
11-24-2003, 05:53 PM
What is the command to view the users in a Linux System?

Modorf
11-24-2003, 05:57 PM
who

hisham
11-24-2003, 06:05 PM
"who" is giving the current user info. I need to know a command to see all users [logged-in / loged-out] in the system.

sharth
11-24-2003, 06:30 PM
cat /etc/passwd

but some users are not user accounts, they are used for daemons and things like that.

Satanic Atheist
11-26-2003, 10:24 AM
Look for utmp and wtmp (you should be able to cat them). One shows who is logged on at the moment, the other shows who has been logged on and what time they logged off. I think they're held in /etc although they could be in /proc...

James

sharth
11-26-2003, 10:46 AM
probably /var/log

Satanic Atheist
11-26-2003, 01:46 PM
sharth was closest:

They're in /var/adm (sounds a little local-specific to me).

Here (http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?utmp+4) is the on-line manpage. Interestingly enough, all the info can be gotten with commands like who, last and write so you may wish to try them first. At the very least the output might be formatted a little friendlier.

James

blobaugh
11-27-2003, 11:15 PM
I believe finger may work. Just type finger. It always showed all my logins for like a week. Don't know if it was suppossed to though

serz
11-27-2003, 11:40 PM
One thing to add:

w shows more info than who, it is more complete :D

blobaugh
11-28-2003, 12:21 AM
I just remembered. You can also use webmin. I will show when, how long, why they logged out.