listusers.1 (2010 09)
l
listusers(1) listusers(1)
NAME
listusers - display user login data
SYNOPSIS
listusers [[-b|-c] -g
groups][-l logins ][-r local|nis]
DESCRIPTION
The
listusers command displays data concerning user logins. The output shows the user login and
the /etc/passwd comment field value (for example, user name, location). The default displays data
about all user logins.
Options
The
listusers command supports the following options:
-b Display only users who have groups, as their primary group. Use with the
-g
option.
-c Display only users who have groups, as their supplementary group. Use with the
-g option.
-g groups Display all users belonging to groups, sorted by login. A comma separated list
specifies multiple groups.
-l logins Display the requested logins . A comma separated list specifies multiple logins.
-r local | nis
Display only users belonging to the specified repository, either nis for NIS or
local users.
A user login has a UID of 100 or greater.
When the
-l and -g options are combined, a user login is only displayed once, even though the login may
belong to multiple specified groups.
EXAMPLES
List all user logins.
listusers
List all user logins in the group cmds and the users bob, john and otto
, removing all duplicates.
listusers -g cmds -l bob,john,otto
List all users who have cmds as their primary group.
listusers -b -g cmds
List all users who have cmds as their supplementary group.
listusers -c -g cmds
List only local user logins.
listusers -r local
List only NIS user logins.
listusers -r nis
FILES
/etc/passwd
/etc/group
SEE ALSO
passwd(1), logins(1M), group(4), passwd(4).
STANDARDS CONFORMANCE
listusers: SVID3
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1