break out special local mail processing (e.g., mapping to the
[unix-history] / usr / src / usr.bin / chpass / chpass.1
CommitLineData
3cadd34f
KB
1.\" Copyright (c) 1988, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
0568f98e 3.\"
b5dc1377 4.\" %sccs.include.redist.man%
0568f98e 5.\"
af143eb3 6.\" @(#)chpass.1 8.2 (Berkeley) %G%
0568f98e 7.\"
b5dc1377
CL
8.Dd
9.Dt CHPASS 1
0e853b88 10.Os
b5dc1377
CL
11.Sh NAME
12.Nm chpass
13.Nd add or change user database information
14.Sh SYNOPSIS
15chpass
16.Op Fl a Ar list
8e7982f9 17.Op Fl s Ar newshell
b5dc1377
CL
18.Op user
19.Sh DESCRIPTION
20.Nm Chpass
0568f98e
KB
21allows editing of the user database information associated
22with
b5dc1377 23.Ar user
0568f98e
KB
24or, by default, the current user.
25The information is formatted and supplied to an editor for changes.
b5dc1377 26.Pp
0568f98e 27Only the information that the user is allowed to change is displayed.
b5dc1377
CL
28.Pp
29The options are as follows:
0e853b88
CL
30.Bl -tag -width Ds
31.It Fl a
b5dc1377
CL
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.
0e853b88 38.It Fl s
b5dc1377
CL
39The
40.Fl s
41option attempts to change the user's shell to
8e7982f9 42.Ar newshell .
0e853b88 43.El
b5dc1377 44.Pp
74086f3a 45Possible display items are as follows:
b5dc1377 46.Pp
0e853b88
CL
47.Bl -tag -width "Home Directory:" -compact -offset indent
48.It Login:
b5dc1377 49user's login name
0e853b88 50.It Password:
b5dc1377 51user's encrypted password
0e853b88 52.It Uid:
8e7982f9 53user's login
0e853b88 54.It Gid:
8e7982f9 55user's login group
0e853b88 56.It Change:
b5dc1377 57password change time
0e853b88 58.It Expire:
b5dc1377 59account expiration time
0e853b88 60.It Class:
b5dc1377 61user's general classification
0e853b88 62.It Home Directory:
b5dc1377 63user's home directory
0e853b88 64.It Shell:
b5dc1377 65user's login shell
0e853b88 66.It Full Name:
b5dc1377 67user's real name
0e853b88 68.It Location:
b5dc1377 69user's normal location
0e853b88 70.It Home Phone:
b5dc1377 71user's home phone
0e853b88 72.It Office Phone:
b5dc1377 73user's office phone
0e853b88 74.El
b5dc1377 75.Pp
74086f3a 76The
b5dc1377 77.Ar login
b7eb8299 78field is the user name used to access the computer account.
b5dc1377 79.Pp
b7eb8299 80The
b5dc1377 81.Ar password
b7eb8299 82field contains the encrypted form of the user's password.
b5dc1377 83.Pp
b7eb8299 84The
b5dc1377 85.Ar uid
b7eb8299 86field is the number associated with the
b5dc1377 87.Ar login
b7eb8299
KB
88field.
89Both of these fields should be unique across the system (and often
90across a group of systems) as they control file access.
b5dc1377 91.Pp
74086f3a
KB
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.
b5dc1377 96.Pp
74086f3a 97The
b5dc1377 98.Ar group
34dda72c 99field is the group that the user will be placed in at login.
8e7982f9 100Since BSD supports multiple groups (see
b5dc1377 101.Xr groups 1 )
74086f3a
KB
102this field currently has little special meaning.
103This field may be filled in with either a number or a group name (see
b5dc1377
CL
104.Xr group 5 ) .
105.Pp
74086f3a 106The
b5dc1377 107.Ar change
7f554f7b 108field is the date by which the password must be changed.
b5dc1377 109.Pp
74086f3a 110The
b5dc1377 111.Ar expire
7f554f7b 112field is the date on which the account expires.
b5dc1377 113.Pp
74086f3a 114Both the
b5dc1377 115.Ar change
74086f3a 116and
b5dc1377 117.Ar expire
ef97d022 118fields should be entered in the form ``month day year'' where
b5dc1377 119.Ar month
7f554f7b 120is the month name (the first three characters are sufficient),
b5dc1377 121.Ar day
d264b2a3 122is the day of the month, and
b5dc1377 123.Ar year
7f554f7b 124is the year.
0e853b88 125.Pp
74086f3a 126The
b5dc1377 127.Ar class
74086f3a
KB
128field is currently unused. In the near future it will be a key to
129a
b5dc1377 130.Xr termcap 5
74086f3a 131style database of user attributes.
b5dc1377 132.Pp
5325ced3
CL
133The user's
134.Ar home directory
135is the full UNIX path name where the user
34dda72c 136will be placed at login.
b5dc1377 137.Pp
5325ced3
CL
138The
139.Ar shell
140field is the command interpreter the user prefers.
74086f3a 141If the
b5dc1377
CL
142.Ar shell
143field is empty, the Bourne shell,
144.Pa /bin/sh ,
145is assumed.
34dda72c
KB
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
b5dc1377
CL
150.Pa /etc/shells .
151.Pp
5325ced3
CL
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.
b5dc1377 159.Pp
0568f98e 160Once the information has been verified,
b5dc1377 161.Nm chpass
0568f98e 162uses
bc3d7b01
KB
163.Xr pwd_mkdb 8
164to update the user database.
b5dc1377
CL
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
0e853b88
CL
175.Bl -tag -width /etc/master.passwd -compact
176.It Pa /etc/master.passwd
b5dc1377 177The user database
0e853b88 178.It Pa /etc/passwd
bc3d7b01 179A Version 7 format password file
0e853b88 180.It Pa /etc/chpass.XXXXXX
bc3d7b01 181Temporary copy of the password file
0e853b88 182.It Pa /etc/shells
b5dc1377 183The list of approved shells
0e853b88 184.El
b5dc1377
CL
185.Sh SEE ALSO
186.Xr login 1 ,
187.Xr finger 1 ,
bc3d7b01 188.Xr passwd 1 ,
b5dc1377
CL
189.Xr getusershell 3 ,
190.Xr passwd 5 ,
bc3d7b01 191.Xr pwd_mkdb 8 ,
b5dc1377 192.Xr vipw 8
0e853b88
CL
193.Rs
194.%A Robert Morris
af143eb3 195and
0e853b88
CL
196.%A Ken Thompson
197.%T "UNIX Password security"
198.Re
b5dc1377 199.Sh BUGS
74086f3a 200User information should (and eventually will) be stored elsewhere.
0e853b88
CL
201.Sh HISTORY
202The
203.Nm
204command appeared in
205.Bx 4.3 Reno .