trivial pathname changes
[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.\"
b5dc1377 6.\" @(#)chpass.1 5.8 (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:
30.Tp Fl a
31The super-user is allowed to directly supply a user database
32entry, in the format specified by
33.Xr passwd 5 ,
34as an argument.
35This argument must be a colon (``:'') separated list of all the
36user database fields, although they may be empty.
37.Tp Fl s
38The
39.Fl s
40option attempts to change the user's shell to
41.Ar newsh .
42.Tp
43.Pp
74086f3a 44Possible display items are as follows:
b5dc1377
CL
45.Pp
46.Dw Home\ Directory:
47.Dp Login:
48user's login name
49.Dp Password:
50user's encrypted password
51.Dp Uid:
52user's id
53.Dp Gid:
54user's login group id
55.Dp Change:
56password change time
57.Dp Expire:
58account expiration time
59.Dp Class:
60user's general classification
61.Dp Home Directory:
62user's home directory
63.Dp Shell:
64user's login shell
65.Dp Full Name:
66user's real name
67.Dp Location:
68user's normal location
69.Dp Home Phone:
70user's home phone
71.Dp Office Phone:
72user's office phone
73.Dp
74.Pp
74086f3a 75The
b5dc1377 76.Ar login
b7eb8299 77field is the user name used to access the computer account.
b5dc1377 78.Pp
b7eb8299 79The
b5dc1377 80.Ar password
b7eb8299 81field contains the encrypted form of the user's password.
b5dc1377 82.Pp
b7eb8299 83The
b5dc1377 84.Ar uid
b7eb8299 85field is the number associated with the
b5dc1377 86.Ar login
b7eb8299
KB
87field.
88Both of these fields should be unique across the system (and often
89across a group of systems) as they control file access.
b5dc1377 90.Pp
74086f3a
KB
91While it is possible to have multiple entries with identical login names
92and/or identical user id's, it is usually a mistake to do so. Routines
93that manipulate these files will often return only one of the multiple
94entries, and that one by random selection.
b5dc1377 95.Pp
74086f3a 96The
b5dc1377 97.Ar group
34dda72c 98field is the group that the user will be placed in at login.
74086f3a 99Since this system supports multiple groups (see
b5dc1377 100.Xr groups 1 )
74086f3a
KB
101this field currently has little special meaning.
102This field may be filled in with either a number or a group name (see
b5dc1377
CL
103.Xr group 5 ) .
104.Pp
74086f3a 105The
b5dc1377 106.Ar change
7f554f7b 107field is the date by which the password must be changed.
b5dc1377 108.Pp
74086f3a 109The
b5dc1377 110.Ar expire
7f554f7b 111field is the date on which the account expires.
b5dc1377 112.Pp
74086f3a 113Both the
b5dc1377 114.Ar change
74086f3a 115and
b5dc1377 116.Ar expire
ef97d022 117fields should be entered in the form ``month day year'' where
b5dc1377 118.Ar month
7f554f7b 119is the month name (the first three characters are sufficient),
b5dc1377 120.Ar day
d264b2a3 121is the day of the month, and
b5dc1377 122.Ar year
7f554f7b 123is the year.
b5dc1377 124.Pp
74086f3a 125The
b5dc1377 126.Ar class
74086f3a
KB
127field is currently unused. In the near future it will be a key to
128a
b5dc1377 129.Xr termcap 5
74086f3a 130style database of user attributes.
b5dc1377 131.Pp
74086f3a 132The user's home directory is the full UNIX path name where the user
34dda72c 133will be placed at login.
b5dc1377 134.Pp
74086f3a
KB
135The shell field is the command interpreter the user prefers.
136If the
b5dc1377
CL
137.Ar shell
138field is empty, the Bourne shell,
139.Pa /bin/sh ,
140is assumed.
34dda72c
KB
141When altering a login shell, and not the super-user, the user
142may not change from a non-standard shell or to a non-standard
143shell.
144Non-standard is defined as a shell not found in
b5dc1377
CL
145.Pa /etc/shells .
146.Pp
74086f3a
KB
147The last four fields are for storing the user's full name, office
148location, and home and work telephone numbers.
b5dc1377 149.Pp
0568f98e 150Once the information has been verified,
b5dc1377 151.Nm chpass
0568f98e 152uses
b5dc1377 153.Xr mkpasswd 8
0568f98e
KB
154to update the user database. This is run in the background, and,
155at very large sites could take several minutes. Until this update
156is completed, the password file is unavailable for other updates
157and the new information will not be available to programs.
b5dc1377
CL
158.Sh ENVIRONMENT
159The
160.Xr vi 1
161editor will be used unless the environment variable EDITOR is set to
162an alternate editor.
163When the editor terminates, the information is re-read and used to
164update the user database itself.
165Only the user, or the super-user, may edit the information associated
166with the user.
167.Sh FILES
168.Dw /etc/master.passwd
169.Di L
170.Dp Pa /etc/master.passwd
171The user database
172.Dp Pa /etc/shells
173The list of approved shells
174.Dp
175.Sh SEE ALSO
176.Xr login 1 ,
177.Xr finger 1 ,
178.Xr getusershell 3 ,
179.Xr passwd 5 ,
180.Xr mkpasswd 8 ,
181.Xr vipw 8
182.Pp
0568f98e 183Robert Morris and Ken Thompson,
b5dc1377
CL
184.Ar UNIX Password security
185.Sh HISTORY
186First release 4.4 Bsd.
187.Sh BUGS
74086f3a 188User information should (and eventually will) be stored elsewhere.