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