PWGET(1) — HP-UX
Series 300 Only
NAME
pwget, grget − get password and group information
SYNOPSIS
pwget [ −n name | −u uid ]
grget [ −n name | −g gid ]
DESCRIPTION
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 of the format used in the /etc/passwd file (see passwd(4)).
The standard output of grget contains lines of colon-separated group information of the format used in the /etc/group file (see group(4)).
With no options, pwget and grget get all entries with getpwent(3C) or getgrent(3C), respectively, and output a line for each entry found.
Options
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 (on getpwent(3C)).
−u uid Output the first entry that matches uid using getpwuid (on getpwent(3C)).
The options for grget are:
−n name Output the first entry that matches name using getgrnam (on getgrent(3C)).
−g gid Output the first entry that matches gid using getgrgid (on getgrent(3C)).
NETWORKING FEATURES
NFS
These commands provide a way to access password and group information without regard to whether the Yellow Pages (YP) network database is in use or not.
RETURN VALUE
These commands return 0 upon success, 1 when a specific search fails, and 2 upon error.
DEPENDENCIES
NFS
WARNINGS
If the Yellow Pages network database is in use and the YP client daemon (ypbind) is not bound to a YP 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 ALSO
ypmatch(1), ypserv(1M).
AUTHOR
Pwget and grget were developed by HP.
FILES
/etc/group local group data file
/etc/passwd local password data file
SEE ALSO
getgrent(3C), getpwent(3C), group(4), passwd(4).
Hewlett-Packard Company — Version B.1, May 11, 2021