How to list all OS users on RH 9 ?

Bob McClure Jr robertmcclure at earthlink.net
Mon Jun 28 16:19:15 UTC 2004


On Mon, Jun 28, 2004 at 12:00:13PM -0400, Chris A Czerwinski wrote:
> When I execute the command in terminal, I get the following response
> 
> [chris at localhost chris]$
> $ who -q
> chris chris
> #users=2
> 
> How can there be 2 users?
> 
> Chris (Newbie)

It is counting the instances of logins.  You are apparently logged in
twice.  I can get the same result by being logged in to my X session
and a text terminal, tty2 (Ctrl-Alt-F2).

> On Mon, 2004-06-28 at 00:31, sg at pobox.com wrote:
> > On RedHat Linus command is who -q
> > 
> > Rajeev.
> > 
> > *====================================
> > On Monday 28 June 2004 07:42, Yan Peng wrote:
> > > redhat-install-list:
> > >
> > > 	 On solaris, there is one command listusers to list all OS users. I'd like
> > > to know what command can do the same work on RH 9 ? Many thanks.
> > >
> > >
> > >
> > > Yan Peng
> > > yanpeng at mx.cei.gov.cn
> > > 2004-06-28

What was unclear in the initial query was whether he wanted users
_currently_logged_in_ or all the users that existed on the machine.
The awk one-liner I posted will do the latter.  "who -q" (and
"finger", more verbosely) does the former, but as logins, not distinct
users.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure at earthlink.net  http://www.bobcatos.com
I'm a fool for Christ.  Whose fool are you?





More information about the Redhat-install-list mailing list