add .Vx so tmac.andoc will call tmac.mdoc-old
[unix-history] / usr / src / usr.bin / chpass / chpass.1
CommitLineData
b5dc1377 1.\" Copyright (c) 1988, 1990 The Regents of the University of California.
0568f98e
KB
2.\" All rights reserved.
3.\"
b5dc1377 4.\" %sccs.include.redist.man%
0568f98e 5.\"
bc3d7b01 6.\" @(#)chpass.1 5.10 (Berkeley) %G%
0568f98e 7.\"
b5dc1377
CL
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
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:
5325ced3 30.Tw Ds
b5dc1377
CL
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
74086f3a 45Possible display items are as follows:
b5dc1377
CL
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
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.
74086f3a 100Since this system 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.
5325ced3 125.bp
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
175.Dw /etc/master.passwd
176.Di L
177.Dp Pa /etc/master.passwd
178The user database
bc3d7b01
KB
179.Dp Pa /etc/passwd
180A Version 7 format password file
181.Dp Pa /etc/chpass.XXXXXX
182Temporary copy of the password file
b5dc1377
CL
183.Dp Pa /etc/shells
184The list of approved shells
185.Dp
186.Sh SEE ALSO
187.Xr login 1 ,
188.Xr finger 1 ,
bc3d7b01 189.Xr passwd 1 ,
b5dc1377
CL
190.Xr getusershell 3 ,
191.Xr passwd 5 ,
bc3d7b01 192.Xr pwd_mkdb 8 ,
b5dc1377
CL
193.Xr vipw 8
194.Pp
0568f98e 195Robert Morris and Ken Thompson,
b5dc1377
CL
196.Ar UNIX Password security
197.Sh HISTORY
5325ced3 198First release 4.3 Reno BSD.
b5dc1377 199.Sh BUGS
74086f3a 200User information should (and eventually will) be stored elsewhere.