1.\" Copyright (c) 1988, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)chpass.1 5.10 (Berkeley) 02/12/91 7.\" 8.Dd 9.Dt CHPASS 1 10.Os BSD 4.4 11.Sh NAME 12.Nm chpass 13.Nd add or change user database information 14.Sh SYNOPSIS 15chpass 16.Op Fl a Ar list 17.Op Fl s Ar shell 18.Op user 19.Sh DESCRIPTION 20.Nm Chpass 21allows editing of the user database information associated 22with 23.Ar user 24or, by default, the current user. 25The information is formatted and supplied to an editor for changes. 26.Pp 27Only the information that the user is allowed to change is displayed. 28.Pp 29The options are as follows: 30.Tw Ds 31.Tp Fl a 32The super-user is allowed to directly supply a user database 33entry, in the format specified by 34.Xr passwd 5 , 35as an argument. 36This argument must be a colon (``:'') separated list of all the 37user database fields, although they may be empty. 38.Tp Fl s 39The 40.Fl s 41option attempts to change the user's shell to 42.Ar newsh . 43.Tp 44.Pp 45Possible display items are as follows: 46.Pp 47.Dw Home\ Directory: 48.Dp Login: 49user's login name 50.Dp Password: 51user's encrypted password 52.Dp Uid: 53user's id 54.Dp Gid: 55user's login group id 56.Dp Change: 57password change time 58.Dp Expire: 59account expiration time 60.Dp Class: 61user's general classification 62.Dp Home Directory: 63user's home directory 64.Dp Shell: 65user's login shell 66.Dp Full Name: 67user's real name 68.Dp Location: 69user's normal location 70.Dp Home Phone: 71user's home phone 72.Dp Office Phone: 73user's office phone 74.Dp 75.Pp 76The 77.Ar login 78field is the user name used to access the computer account. 79.Pp 80The 81.Ar password 82field contains the encrypted form of the user's password. 83.Pp 84The 85.Ar uid 86field is the number associated with the 87.Ar login 88field. 89Both of these fields should be unique across the system (and often 90across a group of systems) as they control file access. 91.Pp 92While it is possible to have multiple entries with identical login names 93and/or identical user id's, it is usually a mistake to do so. Routines 94that manipulate these files will often return only one of the multiple 95entries, and that one by random selection. 96.Pp 97The 98.Ar group 99field is the group that the user will be placed in at login. 100Since this system supports multiple groups (see 101.Xr groups 1 ) 102this field currently has little special meaning. 103This field may be filled in with either a number or a group name (see 104.Xr group 5 ) . 105.Pp 106The 107.Ar change 108field is the date by which the password must be changed. 109.Pp 110The 111.Ar expire 112field is the date on which the account expires. 113.Pp 114Both the 115.Ar change 116and 117.Ar expire 118fields should be entered in the form ``month day year'' where 119.Ar month 120is the month name (the first three characters are sufficient), 121.Ar day 122is the day of the month, and 123.Ar year 124is the year. 125.bp 126The 127.Ar class 128field is currently unused. In the near future it will be a key to 129a 130.Xr termcap 5 131style database of user attributes. 132.Pp 133The user's 134.Ar home directory 135is the full UNIX path name where the user 136will be placed at login. 137.Pp 138The 139.Ar shell 140field is the command interpreter the user prefers. 141If the 142.Ar shell 143field is empty, the Bourne shell, 144.Pa /bin/sh , 145is assumed. 146When altering a login shell, and not the super-user, the user 147may not change from a non-standard shell or to a non-standard 148shell. 149Non-standard is defined as a shell not found in 150.Pa /etc/shells . 151.Pp 152The last four fields are for storing the user's 153.Ar full name , office location , 154and 155.Ar home 156and 157.Ar work telephone 158numbers. 159.Pp 160Once the information has been verified, 161.Nm chpass 162uses 163.Xr pwd_mkdb 8 164to update the user database. 165.Sh ENVIRONMENT 166The 167.Xr vi 1 168editor will be used unless the environment variable EDITOR is set to 169an alternate editor. 170When the editor terminates, the information is re-read and used to 171update the user database itself. 172Only the user, or the super-user, may edit the information associated 173with the user. 174.Sh FILES 175.Dw /etc/master.passwd 176.Di L 177.Dp Pa /etc/master.passwd 178The user database 179.Dp Pa /etc/passwd 180A Version 7 format password file 181.Dp Pa /etc/chpass.XXXXXX 182Temporary copy of the password file 183.Dp Pa /etc/shells 184The list of approved shells 185.Dp 186.Sh SEE ALSO 187.Xr login 1 , 188.Xr finger 1 , 189.Xr passwd 1 , 190.Xr getusershell 3 , 191.Xr passwd 5 , 192.Xr pwd_mkdb 8 , 193.Xr vipw 8 194.Pp 195Robert Morris and Ken Thompson, 196.Ar UNIX Password security 197.Sh HISTORY 198First release 4.3 Reno BSD. 199.Sh BUGS 200User information should (and eventually will) be stored elsewhere. 201