xref: /original-bsd/usr.bin/chpass/chpass.1 (revision 89a39cb6)
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.8 (Berkeley) 06/11/90
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.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
44Possible display items are as follows:
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
75The
76.Ar login
77field is the user name used to access the computer account.
78.Pp
79The
80.Ar password
81field contains the encrypted form of the user's password.
82.Pp
83The
84.Ar uid
85field is the number associated with the
86.Ar login
87field.
88Both of these fields should be unique across the system (and often
89across a group of systems) as they control file access.
90.Pp
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.
95.Pp
96The
97.Ar group
98field is the group that the user will be placed in at login.
99Since this system supports multiple groups (see
100.Xr groups 1 )
101this field currently has little special meaning.
102This field may be filled in with either a number or a group name (see
103.Xr group 5 ) .
104.Pp
105The
106.Ar change
107field is the date by which the password must be changed.
108.Pp
109The
110.Ar expire
111field is the date on which the account expires.
112.Pp
113Both the
114.Ar change
115and
116.Ar expire
117fields should be entered in the form ``month day year'' where
118.Ar month
119is the month name (the first three characters are sufficient),
120.Ar day
121is the day of the month, and
122.Ar year
123is the year.
124.Pp
125The
126.Ar class
127field is currently unused.  In the near future it will be a key to
128a
129.Xr termcap 5
130style database of user attributes.
131.Pp
132The user's home directory is the full UNIX path name where the user
133will be placed at login.
134.Pp
135The shell field is the command interpreter the user prefers.
136If the
137.Ar shell
138field is empty, the Bourne shell,
139.Pa /bin/sh ,
140is assumed.
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
145.Pa /etc/shells .
146.Pp
147The last four fields are for storing the user's full name, office
148location, and home and work telephone numbers.
149.Pp
150Once the information has been verified,
151.Nm chpass
152uses
153.Xr mkpasswd 8
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.
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
183Robert Morris and Ken Thompson,
184.Ar UNIX Password security
185.Sh HISTORY
186First release 4.4 Bsd.
187.Sh BUGS
188User information should (and eventually will) be stored elsewhere.
189