Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

pwget(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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 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 getpwent(3C) and getgrent(3C)), 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() (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

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.

RETURN VALUE

These commands return 0 upon success, 1 when a specific search fails, and 2 upon error.

DEPENDENCIES

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

pwget and grget were developed by HP.

FILES

/etc/group

local group data file

/etc/passwd

local password data file

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.