Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ passwd(4) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login(1)

passwd(1)

vipw(1M)

crypt(3)

getpwent(3)

group(4)




passwd(4) passwd(4)
NAME passwd - password file SYNOPSIS /etc/passwd DESCRIPTION The passwd file contains for each user the following infor- mation: name User's login name; contains no uppercase charac- ters and must not be greater than eight characters long. password encrypted password as well as aging information numeric-user-ID This is the user's ID in the system and it must be unique. numeric-group-ID This is the number of the group that the user be- longs to. real-name In some versions of UNIX, this field also contains the user's office, extension, home phone, and so on. For historical reasons this field is called the GCOS field. default-working-directory The directory that the user is positioned in when they log in - this is known as the `home' directo- ry. shell program to use as Shell when the user logs in. The user's real name field may contain ``&'', meaning insert the login name. The password file 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 newline. If the pass- word field is null, no password is demanded; if the shell field is null, /bin/sh is used. This file resides in directory /etc. Because of the en- crypted passwords, it can and does have general read permis- sion and can be used, for example, to map numeric user ID to names. The encrypted password consists of 13 characters chosen from a 64-character alphabet (., /, 0-9, A-Z, a-z), except when April, 1990 1



passwd(4) passwd(4)
the password is null, in which case the encrypted password is also null. Password aging is effected for a particular user if his encrypted password in the password file is fol- lowed by a comma and a non-null string of characters from the above alphabet. (Such a string must be introduced in the first instance by the superuser.) The first character of the age, M say, denotes the maximum number of weeks for which a password is valid. A user who attempts to login after his password has expired will be forced to supply a new one. The next character, m say, denotes the minimum period in weeks which must expire before the password may be changed. The remaining characters de- fine the week (counted from the beginning of 1970) when the password was last changed. (A null string is equivalent to zero.) M and m have numerical values in the range 0-63 that correspond to the 64-character alphabet shown above (i.e., / = 1 week; z = 63 weeks). If m = M = 0 (derived from the string . or ..) the user will be forced to change his pass- word the next time he logs in (and the ``age'' will disap- pear from his entry in the password file). If m > M (signi- fied, e.g., by the string ./) only the superuser will be able to change the password. The passwd file can also have line beginning with a plus (+), which means to incorporate entries from the yellow pages. There are three styles of + entries: all by itself, + means to insert the entire contents of the yellow pages password file at that point; +name means to insert the entry (if any) for name from the yellow pages at that point; +@name means to insert the entries for all members of the network group name at that point. If a + entry has a non- null password, directory, GCOS, or shell field, they will overide what is contained in the yellow pages. The numeric user ID and group ID fields cannot be overridden. EXAMPLES Here is a sample /etc/passwd file: root:q.mJzTnu8icF.:0:10:God:/:/bin/csh ja:6k/7KCFRPNVXg:508:10:Jerry Asher:/usr2/ja:/bin/csh +melissa: +@documentation:no-login: +:::Guest In this example, there are specific entries for users root and ja, in case the yellow pages are out of order. The user melissa will have her password entry in the yellow pages in- corporated without change; anyone in the netgroup documenta- tion will have their password field disabled, and anyone else will be able to log in with their usual password, shell, and home directory, but with a GCOS field of Guest. 2 April, 1990



passwd(4) passwd(4)
Appropriate precautions must be taken to lock the /etc/passwd file against simultaneous changes if it is to be edited with a text editor; vipw does the necessary locking. FILES /etc/passwd SEE ALSO login(1), passwd(1), vipw(1M), crypt(3), getpwent(3), group(4). April, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026