Don't complain if !-escape entered, but no API using command is run.
[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.\"
b7eb8299 16.\" @(#)chpass.1 5.6 (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
b7eb8299 23chpass [ -a list ] [ user ]
0568f98e
KB
24.SH DESCRIPTION
25.I Chpass
26allows editing of the user database information associated
27with
28.I user
29or, by default, the current user.
30The information is formatted and supplied to an editor for changes.
31The
32.I vi
b7eb8299 33editor will be used unless the environmental variable EDITOR selects
0568f98e
KB
34an alternate editor.
35When the editor terminates, the information is re-read and used to
36update the user database itself.
37Only the user, or the super-user, may edit the information associated
38with the user.
39.PP
40Only the information that the user is allowed to change is displayed.
41.PP
74086f3a
KB
42Possible display items are as follows:
43.PP
44.RS
45 Login: user's login name
b7eb8299 46 Password: user's encrypted password
74086f3a
KB
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
b7eb8299
KB
62.I login
63field is the user name used to access the computer account.
64.PP
65The
66.I password
67field contains the encrypted form of the user's password.
68.PP
69The
74086f3a 70.I uid
b7eb8299
KB
71field is the number associated with the
72.I login
73field.
74Both of these fields should be unique across the system (and often
75across a group of systems) as they control file access.
74086f3a
KB
76.PP
77While it is possible to have multiple entries with identical login names
78and/or identical user id's, it is usually a mistake to do so. Routines
79that manipulate these files will often return only one of the multiple
80entries, and that one by random selection.
81.PP
82The
83.I group
84field is the group that the user will be placed in upon login.
85Since this system supports multiple groups (see
86.IR groups (1))
87this field currently has little special meaning.
88This field may be filled in with either a number or a group name (see
89.IR group (5)).
90.PP
91The
92.I change
7f554f7b 93field is the date by which the password must be changed.
74086f3a
KB
94.PP
95The
96.I expire
7f554f7b 97field is the date on which the account expires.
74086f3a
KB
98.PP
99Both the
100.I change
101and
102.I expire
ef97d022 103fields should be entered in the form ``month day year'' where
74086f3a 104.I month
7f554f7b 105is the month name (the first three characters are sufficient),
ef97d022 106.I day
d264b2a3 107is the day of the month, and
ef97d022 108.I year
7f554f7b 109is the year.
74086f3a
KB
110.PP
111The
112.I class
113field is currently unused. In the near future it will be a key to
114a
115.IR termcap (5)
116style database of user attributes.
117.PP
118The user's home directory is the full UNIX path name where the user
119will be placed on login.
120.PP
121The shell field is the command interpreter the user prefers.
122If the
123.I shell
124field is empty, the Bourne shell (\fI/bin/sh\fP) is assumed.
125.PP
0568f98e
KB
126When altering a login shell, and not the super-user, the user must
127select an approved shell from the list in
128.IR /etc/shells .
129.PP
74086f3a
KB
130The last four fields are for storing the user's full name, office
131location, and home and work telephone numbers.
132.PP
b7eb8299
KB
133The super-user is also allowed to directly supply a user database
134entry, in the format specified by
135.IR passwd (5),
136as an argument to the
137.I -a
138option.
139This argument must be a colon (``:'') separated list of all the
140user database fields, although they may be empty.
0568f98e
KB
141.PP
142Once the information has been verified,
143.I chpass
144uses
145.IR mkpasswd (8)
146to update the user database. This is run in the background, and,
147at very large sites could take several minutes. Until this update
148is completed, the password file is unavailable for other updates
149and the new information will not be available to programs.
150.SH FILES
151.DT
152/etc/master.passwd The user database
153/etc/shells The list of approved shells
154.RE
155.SH "SEE ALSO"
156login(1), finger(1), getusershell(3), passwd(5), mkpasswd(8), vipw(8)
157.br
158Robert Morris and Ken Thompson,
159.I UNIX password security
74086f3a
KB
160.SH BUGS
161User information should (and eventually will) be stored elsewhere.