pwget(1) pwget(1)
NAME [Toc] [Back]
pwget, grget - get password and group information
SYNOPSIS [Toc] [Back]
pwget [-n name | -u uid]
grget [-n name | -g gid]
DESCRIPTION [Toc] [Back]
pwget and grget locate and display information from /etc/passwd and
/etc/group.
The standard output of pwget contains lines of colon-separated
password information whose format is the same as that used in the
/etc/passwd file (see passwd(4)).
The standard output of grget contains lines of colon-separated group
information whose format is the same as that used in the /etc/group
file (see group(4)).
With no options, pwget and grget get all entries with getpwent() or
getgrent() respectively, (see getpwen
), and
output a line for each entry found.
Options [Toc] [Back]
When an option is given, only a single entry is printed.
The options for pwget are:
-n name Output the first entry that matches name using
getpwnam() (see getpwent(3C)).
-u uid Output the first entry that matches uid using
getpwuid() (see getpwent(3C)).
The options for grget are:
-n name Output the first entry that matches name using
getgrnam() (see getgrent(3C)).
-g gid Output the first entry that matches gid using
getgrgid() (see getgrent(3C)).
NETWORKING FEATURES [Toc] [Back]
NFS
If Network Information System (NIS) is in use, these commands provide
password and group information based on the NIS version of the
password and group databases in addition to the local password and
group files.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
pwget(1) pwget(1)
RETURN VALUE [Toc] [Back]
These commands return 0 upon success, 1 when a specific search fails,
and 2 upon error.
DEPENDENCIES [Toc] [Back]
NFS:
WARNING: If the Network Information System network database is in use
and the NIS client daemon (ypbind) is not bound to a NIS server daemon
(see ypserv(1M)), these utilities will wait until such a binding is
established. These commands can be terminated in this condition by
sending a SIGINT signal to the process (see kill(1)).
See ypmatch(1), and ypserv(1M).
AUTHOR [Toc] [Back]
pwget and grget were developed by HP.
FILES [Toc] [Back]
/etc/group local group data file
/etc/passwd local password data file
SEE ALSO [Toc] [Back]
getgrent(3C), getpwent(3C), group(4), passwd(4).
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003 [ Back ] |