PASSWD(5) —
NAME
passwd − password file (includes NFS extensions)
SYNOPSIS
/etc/passwd
DESCRIPTION
Passwd contains for each user the following information:
name (login name, contains no upper case)
encrypted password
numerical user ID
numerical group ID
user’s real name, office, extension, home phone
initial working directory
program to use as shell
The name may contain ‘&’, meaning insert the login name. This information is set by the chfn(1) command and used by the finger(1) command.
This is an ASCII file. Each field within each user’s entry is separated from the next by a colon. Each user 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 of the encrypted passwords, it can and does have general read permission and can be used, for example, to map numerical user ID’s to names.
Appropriate precautions must be taken to lock the file against changes if it is to be edited with a text editor; vipw(8) or ypvipw(8), does the necessary locking. Vipw(8) is used to edit the passwd file if you are not using the Yellow Page. Ypvipw(8) is used to edit the passwd file if you are using the Yellow Pages.
A passwd file can have a line beginning with a plus (+), which will incorporate entries from the yellow pages. There are two styles of + entries. All by itself, + inserts the entire contents of the Yellow Pages passwd file at that point. If a + entry has a not-null password or group member field, the contents of that field will overide whatever is contained in the Yellow Pages. The numerical password id field cannot be overidden.
A passwd file can also have a line beginning with a minus (-); these entries are used to disallow any subsequent entry (if there are any) for name. These entries will be disallowed regardless of whether the subsequent entry comes from the Yellow Pages or the local passwd file.
EXAMPLE
-jburch
+rusty:::::/usr/42port/rusty:/bin/csh
+:
If these entries appear at the end of a passwd file, then the user jburch will be ignored if it appears after the entry -jburch. Also, the user rusty will have the initial working directory of /usr/42port/rusty and /bin/csh for his shell. Rusty will also have the encrypted password, numerical user id, and his real name, office, and other user information from the Yellow Pages entry. All the users listed in the Yellow Pages will be pulled in and placed after the entry for rusty.
FILES
/etc/passwd
/etc/yp/passwd
SEE ALSO
getpwent(3), login(1), crypt(3), passwd(1), group(5), chfn(1), finger(1), vipw(8), adduser(8), ypvipw(8), mkpasswd(8)
BUGS
User information (name, office, etc.) should be stored elsewhere.
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — Sept 1988