xref: /csrg-svn/share/man/man5/passwd.5 (revision 48830)
1*48830Scael.\" Copyright (c) 1988, 1991 The Regents of the University of California.
236872Sbostic.\" All rights reserved.
320815Smckusick.\"
443579Strent.\" %sccs.include.redist.man%
536872Sbostic.\"
6*48830Scael.\"     @(#)passwd.5	6.7 (Berkeley) 04/29/91
736872Sbostic.\"
8*48830Scael.Dd
9*48830Scael.Dt PASSWD 5
10*48830Scael.Os
11*48830Scael.Sh NAME
12*48830Scael.Nm passwd
13*48830Scael.Nd format of the password file
14*48830Scael.Sh DESCRIPTION
15*48830ScaelThe
16*48830Scael.Nm passwd
1736872Sbosticfiles are files consisting of newline separated records, one per user,
1836872Sbosticcontaining ten colon (``:'') separated fields.  These fields are as
1936872Sbosticfollows:
20*48830Scael.Pp
21*48830Scael.Bl -tag -width password -offset indent
22*48830Scael.It name
23*48830ScaelUser's login name.
24*48830Scael.It password
25*48830ScaelUser's
26*48830Scael.Em encrypted
27*48830Scaelpassword.
28*48830Scael.It uid
29*48830ScaelUser's id.
30*48830Scael.It gid
31*48830ScaelUser's login group id.
32*48830Scael.It class
33*48830ScaelUser's general classification (unused).
34*48830Scael.It change
35*48830ScaelPassword change time.
36*48830Scael.It expire
37*48830ScaelAccount expiration time.
38*48830Scael.It gecos
39*48830ScaelGeneral information about the user.
40*48830Scael.It home_dir
41*48830ScaelUser's home directory.
42*48830Scael.It shell
43*48830ScaelUser's login shell.
44*48830Scael.El
45*48830Scael.Pp
4636872SbosticThe
47*48830Scael.Ar name
4836872Sbosticfield is the login used to access the computer account, and the
49*48830Scael.Ar uid
5036872Sbosticfield is the number associated with it.  They should both be unique
5136872Sbosticacross the system (and often across a group of systems) since they
5236872Sbosticcontrol file access.
53*48830Scael.Pp
5436872SbosticWhile it is possible to have multiple entries with identical login names
5536872Sbosticand/or identical user id's, it is usually a mistake to do so.  Routines
5636872Sbosticthat manipulate these files will often return only one of the multiple
5736872Sbosticentries, and that one by random selection.
58*48830Scael.Pp
5937184SbosticThe login name must never begin with a hyphen (``-''); also, it is strongly
6037184Sbosticsuggested that neither upper-case characters or dots (``.'') be part
6137184Sbosticof the name, as this tends to confuse mailers.  No field may contain a
6237184Sbosticcolon (``:'') as this has been used historically to separate the fields
6337184Sbosticin the user database.
64*48830Scael.Pp
6536872SbosticThe password field is the
66*48830Scael.Em encrypted
6736872Sbosticform of the password.
6836872SbosticIf the
69*48830Scael.Ar password
7036872Sbosticfield is empty, no password will be required to gain access to the
7136872Sbosticmachine.  This is almost invariably a mistake.
7236872SbosticBecause these files contain the encrypted user passwords, they should
7336872Sbosticnot be readable by anyone without appropriate privileges.
74*48830Scael.Pp
7536872SbosticThe group field is the group that the user will be placed in upon login.
7636872SbosticSince this system supports multiple groups (see
77*48830Scael.Xr groups 1 )
7836872Sbosticthis field currently has little special meaning.
79*48830Scael.Pp
8036872SbosticThe
81*48830Scael.Ar class
8236872Sbosticfield is currently unused.  In the near future it will be a key to
8336872Sbostica
84*48830Scael.Xr termcap 5
8536872Sbosticstyle database of user attributes.
86*48830Scael.Pp
8736872SbosticThe
88*48830Scael.Ar change
89*48830Scaelfield is the number in seconds,
90*48830Scael.Dv GMT ,
91*48830Scaelfrom the epoch, until the
9236872Sbosticpassword for the account must be changed.
9337670SbosticThis field may be left empty to turn off the password aging feature.
94*48830Scael.Pp
9536872SbosticThe
96*48830Scael.Ar expire
97*48830Scaelfield is the number in seconds,
98*48830Scael.Dv GMT ,
99*48830Scaelfrom the epoch, until the
10036872Sbosticaccount expires.
10137670SbosticThis field may be left empty to turn off the account aging feature.
102*48830Scael.Pp
10336872SbosticThe
104*48830Scael.Ar gecos
10536872Sbosticfield normally contains comma (``,'') separated subfields as follows:
106*48830Scael.Pp
107*48830Scael.Bd -unfilled -offset indent
108*48830Scaelname		user's full name
109*48830Scaeloffice		user's office number
110*48830Scaelwphone		user's work phone number
111*48830Scaelhphone		user's home phone number
112*48830Scael.Ed
113*48830Scael.Pp
11436872SbosticThis information is used by the
115*48830Scael.Xr finger 1
11636872Sbosticprogram.
117*48830Scael.Pp
118*48830ScaelThe user's home directory is the full
119*48830Scael.Tn UNIX
120*48830Scaelpath name where the user
12136872Sbosticwill be placed on login.
122*48830Scael.Pp
12336872SbosticThe shell field is the command interpreter the user prefers.
124*48830ScaelIf there is nothing in the
125*48830Scael.Ar shell
126*48830Scaelfield, the Bourne shell
127*48830Scael.Pq Pa /bin/sh
128*48830Scaelis assumed.
129*48830Scael.Sh SEE ALSO
130*48830Scael.Xr chpass 1 ,
131*48830Scael.Xr login 1 ,
132*48830Scael.Xr passwd 1 ,
133*48830Scael.Xr getpwent 3 ,
134*48830Scael.Xr adduser 8 ,
135*48830Scael.Xr pwd_mkdb 8 ,
136*48830Scael.Xr vipw 8
137*48830Scael.Sh BUGS
13836872SbosticUser information should (and eventually will) be stored elsewhere.
139*48830Scael.Sh HISTORY
140*48830ScaelA
141*48830Scael.Nm
142*48830Scaelfile format appeared in
143*48830Scael.At v6 .
144