passwd(5)
Name
passwd − password file
Description
The passwd file is an ASCII file that contains the following information for each user:
Login name
Password field
User ID
Group ID
User’s real name, office, extension, home phone
Initial working directory
Program to use as Shell
Each line in the passwd file represents a user entry. Each field within a user entry is separated from the next by a colon. Each user entry is separated from the next by a new line. If the password field is null, no password is demanded; if the Shell field is null, then /bin/sh is used.
This file resides in directory /etc. Because the password, if present, is encrypted, the passwd file has general read permission and can be used, for example, to map user IDs to names.
The “user’s real name” can contain an ampersand (&), meaning insert the login name. This information is set by the chfn() command and used by the finger() command.
Appropriate precautions must be taken to lock the file against changes if it is to be edited with a text editor. The vipw command does the necessary locking.
If the system is running UPGRADE security level and an asterisk appears in the password field, or if the system is running ENHANCED level, then the content of the password field is ignored and the password for the account is located in the authentication database. See auth() and the Security Guide for Administrators for more information.
The files /etc/passwd.dir and /etc/passwd.pag, if they exist, contain the hashed version of the /etc/passwd file. If present, they are used by the getpwnam and getpwuid functions to retrieve entries rapidly. See mkpasswd() for more information.
The passwd database can be distributed in a network by a naming service, such as Yellow Pages or BIND/Hesiod. See the Guide to the Yellow Pages Service or the Guide to the BIND/Hesiod Service for setup information.
Restrictions
The “name” can contain only lowercase ASCII characters a to z and the numbers 0 to 9.
Files
/etc/passwd
/etc/passwd.dir
/etc/passwd.pag
See Also
chfn(1), finger(1), login(1), passwd(1), crypt(3), getpwent(3), auth(5), group(5), adduser(8), mkpasswd(8), vipw(8)
Guide to the BIND/Hesiod Service
Guide to the Yellow Pages Service
Security Guide for Administrators