1.\" $NetBSD: chpass.1,v 1.17 2001/12/01 18:55:17 wiz Exp $ 2.\" 3.\" Copyright (c) 1988, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)chpass.1 8.2 (Berkeley) 12/30/93 35.\" 36.Dd December 30, 1993 37.Dt CHPASS 1 38.Os 39.Sh NAME 40.Nm chpass , 41.Nm chfn , 42.Nm chsh 43.Nd add or change user database information 44.Sh SYNOPSIS 45.Nm 46.Op Fl a Ar list 47.Op Fl s Ar newshell 48.Op user 49.Sh DESCRIPTION 50.Nm 51allows editing of the user database information associated 52with 53.Ar user 54or, by default, the current user. 55The information is formatted and supplied to an editor for changes. 56.Pp 57Only the information that the user is allowed to change is displayed. 58.Pp 59The options are as follows: 60.Bl -tag -width Ds 61.It Fl a 62The super-user is allowed to directly supply a user database 63entry, in the format specified by 64.Xr passwd 5 , 65as an argument. 66This argument must be a colon (``:'') separated list of all the 67user database fields, although they may be empty. 68.It Fl s 69The 70.Fl s 71option attempts to change the user's shell to 72.Ar newshell . 73.El 74.Pp 75Possible display items are as follows: 76.Pp 77.Bl -tag -width "Home Directory:" -compact -offset indent 78.It Login : 79user's login name 80.It Password : 81user's encrypted password 82.It Uid : 83user's login 84.It Gid : 85user's login group 86.It Change : 87password change time 88.It Expire : 89account expiration time 90.It Class : 91user's general classification 92.It Home Directory : 93user's home directory 94.It Shell : 95user's login shell 96.It Full Name : 97user's real name 98.It Location : 99user's normal location 100.It Home Phone : 101user's home phone 102.It Office Phone : 103user's office phone 104.El 105.Pp 106The 107.Ar login 108field is the user name used to access the computer account. 109.Pp 110The 111.Ar password 112field contains the encrypted form of the user's password. 113.Pp 114The 115.Ar uid 116field is the number associated with the 117.Ar login 118field. 119Both of these fields should be unique across the system (and often 120across a group of systems) as they control file access. 121.Pp 122While it is possible to have multiple entries with identical login names 123and/or identical user id's, it is usually a mistake to do so. Routines 124that manipulate these files will often return only one of the multiple 125entries, and that one by random selection. 126.Pp 127The 128.Ar group 129field is the group that the user will be placed in at login. 130Since 131.Bx 132supports multiple groups (see 133.Xr groups 1 ) 134this field currently has little special meaning. 135This field may be filled in with either a number or a group name (see 136.Xr group 5 ) . 137.Pp 138The 139.Ar change 140field is the date by which the password must be changed. 141.Pp 142The 143.Ar expire 144field is the date on which the account expires. 145.Pp 146Both the 147.Ar change 148and 149.Ar expire 150fields should be entered in the form ``month day year'' where 151.Ar month 152is the month name (the first three characters are sufficient), 153.Ar day 154is the day of the month, and 155.Ar year 156is the year. 157.Pp 158The 159.Ar class 160field is currently unused. In the near future it will be a key to 161a 162.Xr termcap 5 163style database of user attributes. 164.Pp 165The user's 166.Ar home directory 167is the full 168.Ux 169path name where the user will be placed at login. 170.Pp 171The 172.Ar shell 173field is the command interpreter the user prefers. 174If the 175.Ar shell 176field is empty, the Bourne shell, 177.Pa /bin/sh , 178is assumed. 179When altering a login shell, and not the super-user, the user 180may not change from a non-standard shell or to a non-standard 181shell. 182Non-standard is defined as a shell not found in 183.Pa /etc/shells . 184.Pp 185The last four fields are for storing the user's 186.Ar full name , office location , 187and 188.Ar home 189and 190.Ar work telephone 191numbers. 192.Pp 193Once the information has been verified, 194.Nm 195uses 196.Xr pwd_mkdb 8 197to update the user database. 198.Sh ENVIRONMENT 199The 200.Xr vi 1 201editor will be used unless the environment variable 202.Ev EDITOR 203is set to an alternative editor. 204When the editor terminates, the information is re-read and used to 205update the user database itself. 206Only the user, or the super-user, may edit the information associated 207with the user. 208.Sh FILES 209.Bl -tag -width /etc/master.passwd -compact 210.It Pa /etc/master.passwd 211The user database 212.It Pa /etc/passwd 213A Version 7 format password file 214.It Pa /etc/ptmp 215Lock file for the passwd database 216.It Pa /etc/pw.XXXXXX 217Temporary copy of the user passwd information 218.It Pa /etc/shells 219The list of approved shells 220.El 221.Sh SEE ALSO 222.Xr finger 1 , 223.Xr login 1 , 224.Xr passwd 1 , 225.Xr getusershell 3 , 226.Xr passwd 5 , 227.Xr passwd.conf 5 , 228.Xr pwd_mkdb 8 , 229.Xr vipw 8 230.Rs 231.%A Robert Morris 232.%A Ken Thompson 233.%T "UNIX Password Security" 234.Re 235.Sh HISTORY 236The 237.Nm 238command appeared in 239.Bx 4.3 Reno . 240.Sh BUGS 241This program's interface is poorly suited to cryptographic systems such as 242Kerberos, and consequently Kerberos password changing is not a feature of 243this program. 244.Pp 245User information should (and eventually will) be stored elsewhere. 246