Invoking getpwnam
=================

get (and print) information from the /etc/passwd database. By default, information for the current user is provided. This command uses getpwnam(3) or getpwuid(3) to obtain the requested information.  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 section 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 user information from the passwd file - Ver. 1.0
     USAGE:  getpwnam [ -<flag> | --<name> ]... [ user-name-or-id ]

        -n, --name                 Print the user name
        -p, --passwd               Print the (encrypted) user 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
        -V, --verbose              Verbose output
            --version              Output version information and exit
        -h, --help                 Display usage information and exit

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

     get (and print) information from the /etc/passwd database.
     By default, information for the current user is provided.

     please send bug reports to:  coreutils-bugs@gnu.org

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) user password'' option. The encrypted password will be printed.  If a shadow password is used, the value will typically be the single letter "x".

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.