Invoking getpwnam
*****************

This command uses getpwnam(3) or getpwuid(3) to obtain the requested information from the passwd database.  If a user name or user id is not provided, the information for the current user is obtained. The results are printed in the order selected.  If you select no options, nothing is printed on success, but the user name/user id will have been validated.

This chapter was generated by AutoGen, the aginfo template and the option descriptions for the getpwnam program.  It documents the getpwnam usage text and option meanings.

This software is released under the GNU General Public License.

getpwnam usage help (-?)
========================

This is the automatically generated usage text for getpwnam:

     getpwnam - Get password entries - Ver. 1.4
     USAGE:  getpwnam [ -<flag> | --<name> ]... [ user-name-or-id ]

        -n, --name                 Print the user name
        -p, --passwd               Print the (encrypted) password
        -u, --uid                  Print the user id
        -g, --gname                Print the group name
        -G, --gid                  Print the group id
        -N, --gecos                Print the real user name (comment string)
        -d, --dir                  Print the home directory
        -s, --shell                Print the login shell
        -A, --all                  Print everything
                                     - prohibits these options:
                                     name
                                     passwd
                                     uid
                                     gname
                                     gid
                                     gecos
                                     dir
                                     shell
        -V, --verbose              Verbose output
        -v, --version[=arg]        Output version information and exit
        -?, --help                 Display usage information and exit
        -!, --more-help            Extended usage information passed thru pager

     Options are specified by doubled hyphens and their name
     or by a single hyphen and the flag character.

     This command uses getpwnam(3) or getpwuid(3) to obtain the requested
     information from the passwd database.  If a user name or user id is
     not provided, the information for the current user is obtained.
     The results are printed in the order selected.  If you select no options,
     nothing is printed on success, but the user name/user id will have been
     validated.

     please send bug reports to:  autogen-bugs@lists.sf.net

name option (-n)
================

This is the ``print the user name'' option. The user login name will be printed.

passwd option (-p)
==================

This is the ``print the (encrypted) password'' option. The encrypted password will be printed.

uid option (-u)
===============

This is the ``print the user id'' option. The numeric user id will be printed.

gname option (-g)
=================

This is the ``print the group name'' option. The name of the user's primary group will be printed.

gid option (-G)
===============

This is the ``print the group id'' option. The numeric primary group id will be printed.

gecos option (-N)
=================

This is the ``print the real user name (comment string)'' option. The real user name will be printed, usually. It is designated as the account "comment string".

dir option (-d)
===============

This is the ``print the home directory'' option. The user's home directory will be printed.

shell option (-s)
=================

This is the ``print the login shell'' option. The name of the program that is run when the user logs in will be printed.

all option (-A)
===============

This is the ``print everything'' option.

This option has some usage constraints.  It:

  * must not appear in combination with any of the following options: name, passwd, uid, gname, gid, gecos, dir, shell.

Print all of the available fields, including the name of the primary group.

verbose option (-V)
===================

This is the ``verbose output'' option. Print each item of information on a separate line, with a short description of each.