1.\" Copyright (c) 1988, 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)passwd.5 6.7 (Berkeley) 4/29/91 33.\" $Id: passwd.5,v 1.2 1993/08/01 07:35:26 mycroft Exp $ 34.\" 35.Dd April 29, 1991 36.Dt PASSWD 5 37.Os 38.Sh NAME 39.Nm passwd 40.Nd format of the password file 41.Sh DESCRIPTION 42The 43.Nm passwd 44files are files consisting of newline separated records, one per user, 45containing ten colon (``:'') separated fields. These fields are as 46follows: 47.Pp 48.Bl -tag -width password -offset indent 49.It name 50User's login name. 51.It password 52User's 53.Em encrypted 54password. 55.It uid 56User's id. 57.It gid 58User's login group id. 59.It class 60User's general classification (unused). 61.It change 62Password change time. 63.It expire 64Account expiration time. 65.It gecos 66General information about the user. 67.It home_dir 68User's home directory. 69.It shell 70User's login shell. 71.El 72.Pp 73The 74.Ar name 75field is the login used to access the computer account, and the 76.Ar uid 77field is the number associated with it. They should both be unique 78across the system (and often across a group of systems) since they 79control file access. 80.Pp 81While it is possible to have multiple entries with identical login names 82and/or identical user id's, it is usually a mistake to do so. Routines 83that manipulate these files will often return only one of the multiple 84entries, and that one by random selection. 85.Pp 86The login name must never begin with a hyphen (``-''); also, it is strongly 87suggested that neither upper-case characters or dots (``.'') be part 88of the name, as this tends to confuse mailers. No field may contain a 89colon (``:'') as this has been used historically to separate the fields 90in the user database. 91.Pp 92The password field is the 93.Em encrypted 94form of the password. 95If the 96.Ar password 97field is empty, no password will be required to gain access to the 98machine. This is almost invariably a mistake. 99Because these files contain the encrypted user passwords, they should 100not be readable by anyone without appropriate privileges. 101.Pp 102The group field is the group that the user will be placed in upon login. 103Since this system supports multiple groups (see 104.Xr groups 1 ) 105this field currently has little special meaning. 106.Pp 107The 108.Ar class 109field is currently unused. In the near future it will be a key to 110a 111.Xr termcap 5 112style database of user attributes. 113.Pp 114The 115.Ar change 116field is the number in seconds, 117.Dv GMT , 118from the epoch, until the 119password for the account must be changed. 120This field may be left empty to turn off the password aging feature. 121.Pp 122The 123.Ar expire 124field is the number in seconds, 125.Dv GMT , 126from the epoch, until the 127account expires. 128This field may be left empty to turn off the account aging feature. 129.Pp 130The 131.Ar gecos 132field normally contains comma (``,'') separated subfields as follows: 133.Pp 134.Bd -unfilled -offset indent 135name user's full name 136office user's office number 137wphone user's work phone number 138hphone user's home phone number 139.Ed 140.Pp 141This information is used by the 142.Xr finger 1 143program. 144.Pp 145The user's home directory is the full 146.Tn UNIX 147path name where the user 148will be placed on login. 149.Pp 150The shell field is the command interpreter the user prefers. 151If there is nothing in the 152.Ar shell 153field, the Bourne shell 154.Pq Pa /bin/sh 155is assumed. 156.Sh SEE ALSO 157.Xr chpass 1 , 158.Xr login 1 , 159.Xr passwd 1 , 160.Xr getpwent 3 , 161.Xr mkpasswd 8 , 162.Xr vipw 8 163.Xr adduser 8 164.Sh BUGS 165User information should (and eventually will) be stored elsewhere. 166.Sh HISTORY 167A 168.Nm 169file format appeared in 170.At v6 . 171