BSD 4_4 development
[unix-history] / usr / share / man / cat5 / passwd.5
CommitLineData
6c2f6ca5
C
1PASSWD(5) BSD Programmer's Manual PASSWD(5)
2
3N\bNA\bAM\bME\bE
4 p\bpa\bas\bss\bsw\bwd\bd - format of the password file
5
6D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
7 The p\bpa\bas\bss\bsw\bwd\bd files are files consisting of newline separated records, one
8 per user, containing ten colon (``:'') separated fields. These fields
9 are as follows:
10
11 name User's login name.
12
13 password User's _\be_\bn_\bc_\br_\by_\bp_\bt_\be_\bd password.
14
15 uid User's id.
16
17 gid User's login group id.
18
19 class User's general classification (unused).
20
21 change Password change time.
22
23 expire Account expiration time.
24
25 gecos General information about the user.
26
27 home_dir User's home directory.
28
29 shell User's login shell.
30
31 The _\bn_\ba_\bm_\be field is the login used to access the computer account, and the
32 _\bu_\bi_\bd field is the number associated with it. They should both be unique
33 across the system (and often across a group of systems) since they con-
34 trol file access.
35
36 While it is possible to have multiple entries with identical login names
37 and/or identical user id's, it is usually a mistake to do so. Routines
38 that manipulate these files will often return only one of the multiple
39 entries, and that one by random selection.
40
41 The login name must never begin with a hyphen (``-''); also, it is
42 strongly suggested that neither upper-case characters or dots (``.'') be
43 part of the name, as this tends to confuse mailers. No field may contain
44 a colon (``:'') as this has been used historically to separate the fields
45 in the user database.
46
47 The password field is the _\be_\bn_\bc_\br_\by_\bp_\bt_\be_\bd form of the password. If the
48 _\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd field is empty, no password will be required to gain access to
49 the machine. This is almost invariably a mistake. Because these files
50 contain the encrypted user passwords, they should not be readable by any-
51 one without appropriate privileges.
52
53 The group field is the group that the user will be placed in upon login.
54 Since this system supports multiple groups (see groups(1)) this field
55 currently has little special meaning.
56
57 The _\bc_\bl_\ba_\bs_\bs field is currently unused. In the near future it will be a key
58 to a termcap(5) style database of user attributes.
59
60 The _\bc_\bh_\ba_\bn_\bg_\be field is the number in seconds, GMT, from the epoch, until the
61 password for the account must be changed. This field may be left empty
62 to turn off the password aging feature.
63
64 The _\be_\bx_\bp_\bi_\br_\be field is the number in seconds, GMT, from the epoch, until the
65 account expires. This field may be left empty to turn off the account
66 aging feature.
67
68 The _\bg_\be_\bc_\bo_\bs field normally contains comma (``,'') separated subfields as
69 follows:
70
71 name user's full name
72 office user's office number
73 wphone user's work phone number
74 hphone user's home phone number
75
76 This information is used by the finger(1) program.
77
78 The user's home directory is the full UNIX path name where the user will
79 be placed on login.
80
81 The shell field is the command interpreter the user prefers. If there is
82 nothing in the _\bs_\bh_\be_\bl_\bl field, the Bourne shell (_\b/_\bb_\bi_\bn_\b/_\bs_\bh) is assumed.
83
84S\bSE\bEE\bE A\bAL\bLS\bSO\bO
85 chpass(1), login(1), passwd(1), getpwent(3), adduser(8),
86 pwd_mkdb(8), vipw(8)
87
88B\bBU\bUG\bGS\bS
89 User information should (and eventually will) be stored elsewhere.
90
91C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY
92 The password file format has changed since 4.3BSD. The following awk
93 script can be used to convert your old-style password file into a new
94 style password file. The additional fields ``class'', ``change'' and
95 ``expire'' are added, but are turned off by default. Class is currently
96 not implemented, but change and expire are; to set them, use the current
97 day in seconds from the epoch + whatever number of seconds of offset you
98 want.
99
100 BEGIN { FS = ":"}
101 { print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 }
102
103H\bHI\bIS\bST\bTO\bOR\bRY\bY
104 A p\bpa\bas\bss\bsw\bwd\bd file format appeared in Version 6 AT&T UNIX.
105
1064.4BSD June 5, 1993 2