don't run the editor setuid; more secure and fixes vi bug
[unix-history] / usr / src / usr.bin / chpass / chpass.1
CommitLineData
0568f98e
KB
1.\" Copyright (c) 1988 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
7f554f7b 16.\" @(#)chpass.1 5.4 (Berkeley) %G%
0568f98e
KB
17.\"
18.TH CHPASS 1 ""
19.UC 4
20.SH NAME
21chpass \- add or change user database information
22.SH SYNOPSIS
23.B chpass
24[ user ]
25.SH DESCRIPTION
26.I Chpass
27allows editing of the user database information associated
28with
29.I user
30or, by default, the current user.
31The information is formatted and supplied to an editor for changes.
32The
33.I vi
34editor will be used unless the environmental variable EDITOR indicates
35an alternate editor.
36When the editor terminates, the information is re-read and used to
37update the user database itself.
38Only the user, or the super-user, may edit the information associated
39with the user.
40.PP
41Only the information that the user is allowed to change is displayed.
42.PP
74086f3a
KB
43Possible display items are as follows:
44.PP
45.RS
46 Login: user's login name
47 Uid: user's id
48 Gid: user's login group id
49 Change: password change time
50 Expire: account expiration time
51 Class: user's general classification
52 Home Directory: user's home directory
53 Shell: user's login shell
54 Full Name: user's real name
55 Location: user's normal location
56 Home Phone: user's home phone
57 Office Phone: user's office phone
58.RE
59.PP
60.PP
61The
62.I name
63field is the login used to access the computer account, and the
64.I uid
65field is the number associated with it. They should both be unique
66across the system (and often across a group of systems) since they
67control file access.
68.PP
69While it is possible to have multiple entries with identical login names
70and/or identical user id's, it is usually a mistake to do so. Routines
71that manipulate these files will often return only one of the multiple
72entries, and that one by random selection.
73.PP
74The
75.I group
76field is the group that the user will be placed in upon login.
77Since this system supports multiple groups (see
78.IR groups (1))
79this field currently has little special meaning.
80This field may be filled in with either a number or a group name (see
81.IR group (5)).
82.PP
83The
84.I change
7f554f7b 85field is the date by which the password must be changed.
74086f3a
KB
86.PP
87The
88.I expire
7f554f7b 89field is the date on which the account expires.
74086f3a
KB
90.PP
91Both the
92.I change
93and
94.I expire
7f554f7b 95fields should be entered in the form ``month dd yy'' where
74086f3a 96.I month
7f554f7b 97is the month name (the first three characters are sufficient),
d264b2a3
KB
98.I dd
99is the day of the month, and
74086f3a 100.I yy
7f554f7b
KB
101is the year.
102Also, either field may be ``none'' which will disable password
103aging or expiration.
74086f3a
KB
104.PP
105The
106.I class
107field is currently unused. In the near future it will be a key to
108a
109.IR termcap (5)
110style database of user attributes.
7f554f7b
KB
111The string ``none'' is the default for not belonging to any
112class.
74086f3a
KB
113.PP
114The user's home directory is the full UNIX path name where the user
115will be placed on login.
116.PP
117The shell field is the command interpreter the user prefers.
118If the
119.I shell
120field is empty, the Bourne shell (\fI/bin/sh\fP) is assumed.
121.PP
0568f98e
KB
122When altering a login shell, and not the super-user, the user must
123select an approved shell from the list in
124.IR /etc/shells .
125.PP
74086f3a
KB
126The last four fields are for storing the user's full name, office
127location, and home and work telephone numbers.
128.PP
0568f98e
KB
129Additions to the user database will be given an illegal passwd
130(``NOLOGIN'') which should be updated using the
131.IR passwd (1)
132program.
133.PP
134Once the information has been verified,
135.I chpass
136uses
137.IR mkpasswd (8)
138to update the user database. This is run in the background, and,
139at very large sites could take several minutes. Until this update
140is completed, the password file is unavailable for other updates
141and the new information will not be available to programs.
142.SH FILES
143.DT
144/etc/master.passwd The user database
145/etc/shells The list of approved shells
146.RE
147.SH "SEE ALSO"
148login(1), finger(1), getusershell(3), passwd(5), mkpasswd(8), vipw(8)
149.br
150Robert Morris and Ken Thompson,
151.I UNIX password security
74086f3a
KB
152.SH BUGS
153User information should (and eventually will) be stored elsewhere.