Commit | Line | Data |
---|---|---|
45338fc4 | 1 | .\" Copyright (c) 1988, 1991 The Regents of the University of California. |
e1db696c KB |
2 | .\" All rights reserved. |
3 | .\" | |
91cff1e1 | 4 | .\" %sccs.include.redist.man% |
e1db696c | 5 | .\" |
45338fc4 | 6 | .\" @(#)passwd.5 6.7 (Berkeley) %G% |
a343bbd7 | 7 | .\" |
45338fc4 CL |
8 | .Dd |
9 | .Dt PASSWD 5 | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm passwd | |
13 | .Nd format of the password file | |
14 | .Sh DESCRIPTION | |
15 | The | |
16 | .Nm passwd | |
e1db696c KB |
17 | files are files consisting of newline separated records, one per user, |
18 | containing ten colon (``:'') separated fields. These fields are as | |
19 | follows: | |
45338fc4 CL |
20 | .Pp |
21 | .Bl -tag -width password -offset indent | |
22 | .It name | |
23 | User's login name. | |
24 | .It password | |
25 | User's | |
26 | .Em encrypted | |
27 | password. | |
28 | .It uid | |
29 | User's id. | |
30 | .It gid | |
31 | User's login group id. | |
32 | .It class | |
33 | User's general classification (unused). | |
34 | .It change | |
35 | Password change time. | |
36 | .It expire | |
37 | Account expiration time. | |
38 | .It gecos | |
39 | General information about the user. | |
40 | .It home_dir | |
41 | User's home directory. | |
42 | .It shell | |
43 | User's login shell. | |
44 | .El | |
45 | .Pp | |
e1db696c | 46 | The |
45338fc4 | 47 | .Ar name |
e1db696c | 48 | field is the login used to access the computer account, and the |
45338fc4 | 49 | .Ar uid |
e1db696c KB |
50 | field is the number associated with it. They should both be unique |
51 | across the system (and often across a group of systems) since they | |
52 | control file access. | |
45338fc4 | 53 | .Pp |
e1db696c KB |
54 | While it is possible to have multiple entries with identical login names |
55 | and/or identical user id's, it is usually a mistake to do so. Routines | |
56 | that manipulate these files will often return only one of the multiple | |
57 | entries, and that one by random selection. | |
45338fc4 | 58 | .Pp |
0982b854 KB |
59 | The login name must never begin with a hyphen (``-''); also, it is strongly |
60 | suggested that neither upper-case characters or dots (``.'') be part | |
61 | of the name, as this tends to confuse mailers. No field may contain a | |
62 | colon (``:'') as this has been used historically to separate the fields | |
63 | in the user database. | |
45338fc4 | 64 | .Pp |
e1db696c | 65 | The password field is the |
45338fc4 | 66 | .Em encrypted |
e1db696c KB |
67 | form of the password. |
68 | If the | |
45338fc4 | 69 | .Ar password |
e1db696c KB |
70 | field is empty, no password will be required to gain access to the |
71 | machine. This is almost invariably a mistake. | |
72 | Because these files contain the encrypted user passwords, they should | |
73 | not be readable by anyone without appropriate privileges. | |
45338fc4 | 74 | .Pp |
e1db696c KB |
75 | The group field is the group that the user will be placed in upon login. |
76 | Since this system supports multiple groups (see | |
45338fc4 | 77 | .Xr groups 1 ) |
e1db696c | 78 | this field currently has little special meaning. |
45338fc4 | 79 | .Pp |
e1db696c | 80 | The |
45338fc4 | 81 | .Ar class |
e1db696c KB |
82 | field is currently unused. In the near future it will be a key to |
83 | a | |
45338fc4 | 84 | .Xr termcap 5 |
e1db696c | 85 | style database of user attributes. |
45338fc4 | 86 | .Pp |
e1db696c | 87 | The |
45338fc4 CL |
88 | .Ar change |
89 | field is the number in seconds, | |
90 | .Dv GMT , | |
91 | from the epoch, until the | |
e1db696c | 92 | password for the account must be changed. |
fbceae23 | 93 | This field may be left empty to turn off the password aging feature. |
45338fc4 | 94 | .Pp |
e1db696c | 95 | The |
45338fc4 CL |
96 | .Ar expire |
97 | field is the number in seconds, | |
98 | .Dv GMT , | |
99 | from the epoch, until the | |
e1db696c | 100 | account expires. |
fbceae23 | 101 | This field may be left empty to turn off the account aging feature. |
45338fc4 | 102 | .Pp |
e1db696c | 103 | The |
45338fc4 | 104 | .Ar gecos |
e1db696c | 105 | field normally contains comma (``,'') separated subfields as follows: |
45338fc4 CL |
106 | .Pp |
107 | .Bd -unfilled -offset indent | |
108 | name user's full name | |
109 | office user's office number | |
110 | wphone user's work phone number | |
111 | hphone user's home phone number | |
112 | .Ed | |
113 | .Pp | |
e1db696c | 114 | This information is used by the |
45338fc4 | 115 | .Xr finger 1 |
e1db696c | 116 | program. |
45338fc4 CL |
117 | .Pp |
118 | The user's home directory is the full | |
119 | .Tn UNIX | |
120 | path name where the user | |
e1db696c | 121 | will be placed on login. |
45338fc4 | 122 | .Pp |
e1db696c | 123 | The shell field is the command interpreter the user prefers. |
45338fc4 CL |
124 | If there is nothing in the |
125 | .Ar shell | |
126 | field, the Bourne shell | |
127 | .Pq Pa /bin/sh | |
128 | is assumed. | |
129 | .Sh SEE ALSO | |
130 | .Xr chpass 1 , | |
131 | .Xr login 1 , | |
132 | .Xr passwd 1 , | |
133 | .Xr getpwent 3 , | |
134 | .Xr adduser 8 , | |
135 | .Xr pwd_mkdb 8 , | |
136 | .Xr vipw 8 | |
137 | .Sh BUGS | |
e1db696c | 138 | User information should (and eventually will) be stored elsewhere. |
45338fc4 CL |
139 | .Sh HISTORY |
140 | A | |
141 | .Nm | |
142 | file format appeared in | |
143 | .At v6 . |