# passwd - the password file - man(5) - [phpMan]

[_PASSWD_(5)](https://www.chedong.com/phpMan.php/man/PASSWD/5/markdown)                          File Formats and Configuration                          [_PASSWD_(5)](https://www.chedong.com/phpMan.php/man/PASSWD/5/markdown)

## NAME
       passwd - the password file

## DESCRIPTION
       /etc/passwd contains one line for each user account, with seven fields delimited by colons
       (“:”). These fields are:

       •   login name

       •   optional encrypted password

       •   numerical user ID

       •   numerical group ID

       •   user name or comment field

       •   user home directory

       •   optional user command interpreter

       If the _password_ field is a lower-case “x”, then the encrypted password is actually stored in
       the [**shadow**(5)](https://www.chedong.com/phpMan.php/man/shadow/5/markdown) file instead; there _must_ be a corresponding line in the /etc/shadow file, or
       else the user account is invalid.

       The encrypted _password_ field may be empty, in which case no password is required to
       authenticate as the specified login name. However, some applications which read the
       /etc/passwd file may decide not to permit _any_ access at all if the _password_ field is blank.

       A _password_ field which starts with an exclamation mark means that the password is locked. The
       remaining characters on the line represent the _password_ field before the password was locked.

       Refer to [**crypt**(3)](https://www.chedong.com/phpMan.php/man/crypt/3/markdown) for details on how this string is interpreted.

       If the password field contains some string that is not a valid result of [**crypt**(3)](https://www.chedong.com/phpMan.php/man/crypt/3/markdown), for
       instance ! or *, the user will not be able to use a unix password to log in (but the user may
       log in the system by other means).

       The comment field, also known as the gecos field, is used by various system utilities, such
       as [**finger**(1)](https://www.chedong.com/phpMan.php/man/finger/1/markdown). The use of an ampersand here will be replaced by the capitalised login name
       when the field is used or displayed by such system utilities.

       The home directory field provides the name of the initial working directory. The **login**
       program uses this information to set the value of the **$HOME **environmental variable.

       The command interpreter field provides the name of the user's command language interpreter,
       or the name of the initial program to execute. The **login **program uses this information to set
       the value of the **$SHELL **environmental variable. If this field is empty, it defaults to the
       value /bin/sh.

## FILES
       /etc/passwd
           User account information.

       /etc/shadow
           optional encrypted password file

       /etc/passwd-
           Backup file for /etc/passwd.

           Note that this file is used by the tools of the shadow toolsuite, but not by all user and
           password management tools.

## SEE ALSO
       [**crypt**(3)](https://www.chedong.com/phpMan.php/man/crypt/3/markdown), [**getent**(1)](https://www.chedong.com/phpMan.php/man/getent/1/markdown), [**getpwnam**(3)](https://www.chedong.com/phpMan.php/man/getpwnam/3/markdown), [**login**(1)](https://www.chedong.com/phpMan.php/man/login/1/markdown), [**passwd**(1)](https://www.chedong.com/phpMan.php/man/passwd/1/markdown), [**pwck**(8)](https://www.chedong.com/phpMan.php/man/pwck/8/markdown), [**pwconv**(8)](https://www.chedong.com/phpMan.php/man/pwconv/8/markdown), [**pwunconv**(8)](https://www.chedong.com/phpMan.php/man/pwunconv/8/markdown),
       [**shadow**(5)](https://www.chedong.com/phpMan.php/man/shadow/5/markdown), [**su**(1)](https://www.chedong.com/phpMan.php/man/su/1/markdown), [**sulogin**(8)](https://www.chedong.com/phpMan.php/man/sulogin/8/markdown).

shadow-utils 4.13                            05/30/2024                                    [_PASSWD_(5)](https://www.chedong.com/phpMan.php/man/PASSWD/5/markdown)
