]> git.saurik.com Git - apple/system_cmds.git/blame_incremental - chpass.tproj/chpass.1
system_cmds-230.7.tar.gz
[apple/system_cmds.git] / chpass.tproj / chpass.1
... / ...
CommitLineData
1.\" Copyright (c) 1988, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)chpass.1 8.2 (Berkeley) 12/30/93
33.\"
34.Dd December 30, 1993
35.Dt CHPASS 1
36.Os
37.Sh NAME
38.Nm chpass
39.Nd add or change user database information
40.Sh SYNOPSIS
41chpass
42.Op Fl a Ar list
43.Op Fl s Ar newshell
44.Op user
45.Sh DESCRIPTION
46.Nm Chpass
47allows editing of the user database information associated
48with
49.Ar user
50or, by default, the current user.
51The information is formatted and supplied to an editor for changes.
52.Pp
53Only the information that the user is allowed to change is displayed.
54.Pp
55The options are as follows:
56.Bl -tag -width Ds
57.It Fl a
58The super-user is allowed to directly supply a user database
59entry, in the format specified by
60.Xr passwd 5 ,
61as an argument.
62This argument must be a colon (``:'') separated list of all the
63user database fields, although they may be empty.
64.It Fl s
65The
66.Fl s
67option attempts to change the user's shell to
68.Ar newshell .
69.El
70.Pp
71Possible display items are as follows:
72.Pp
73.Bl -tag -width "Home Directory:" -compact -offset indent
74.It Login:
75user's login name
76.It Password:
77user's encrypted password
78.It Uid:
79user's login
80.It Gid:
81user's login group
82.It Change:
83password change time
84.It Expire:
85account expiration time
86.It Class:
87user's general classification
88.It Home Directory:
89user's home directory
90.It Shell:
91user's login shell
92.It Full Name:
93user's real name
94.It Location:
95user's normal location
96.It Home Phone:
97user's home phone
98.It Office Phone:
99user's office phone
100.El
101.Pp
102The
103.Ar login
104field is the user name used to access the computer account.
105.Pp
106The
107.Ar password
108field contains the encrypted form of the user's password.
109.Pp
110The
111.Ar uid
112field is the number associated with the
113.Ar login
114field.
115Both of these fields should be unique across the system (and often
116across a group of systems) as they control file access.
117.Pp
118While it is possible to have multiple entries with identical login names
119and/or identical user id's, it is usually a mistake to do so. Routines
120that manipulate these files will often return only one of the multiple
121entries, and that one by random selection.
122.Pp
123The
124.Ar group
125field is the group that the user will be placed in at login.
126Since BSD supports multiple groups (see
127.Xr groups 1 )
128this field currently has little special meaning.
129This field may be filled in with either a number or a group name (see
130.Xr group 5 ) .
131.Pp
132The
133.Ar change
134field is the date by which the password must be changed.
135.Pp
136The
137.Ar expire
138field is the date on which the account expires.
139.Pp
140Both the
141.Ar change
142and
143.Ar expire
144fields should be entered in the form ``month day year'' where
145.Ar month
146is the month name (the first three characters are sufficient),
147.Ar day
148is the day of the month, and
149.Ar year
150is the year.
151.Pp
152The
153.Ar class
154field is currently unused. In the near future it will be a key to
155a
156.Xr termcap 5
157style database of user attributes.
158.Pp
159The user's
160.Ar home directory
161is the full UNIX path name where the user
162will be placed at login.
163.Pp
164The
165.Ar shell
166field is the command interpreter the user prefers.
167If the
168.Ar shell
169field is empty, the Bourne shell,
170.Pa /bin/sh ,
171is assumed.
172When altering a login shell, and not the super-user, the user
173may not change from a non-standard shell or to a non-standard
174shell.
175Non-standard is defined as a shell not found in
176.Pa /etc/shells .
177.Pp
178The last four fields are for storing the user's
179.Ar full name , office location ,
180and
181.Ar home
182and
183.Ar work telephone
184numbers.
185.Pp
186Once the information has been verified,
187.Nm chpass
188uses
189.Xr pwd_mkdb 8
190to update the user database.
191.Sh ENVIRONMENT
192The
193.Xr vi 1
194editor will be used unless the environment variable EDITOR is set to
195an alternate editor.
196When the editor terminates, the information is re-read and used to
197update the user database itself.
198Only the user, or the super-user, may edit the information associated
199with the user.
200.Sh FILES
201.Bl -tag -width /etc/master.passwd -compact
202.It Pa /etc/master.passwd
203The user database
204.It Pa /etc/passwd
205A Version 7 format password file
206.It Pa /etc/chpass.XXXXXX
207Temporary copy of the password file
208.It Pa /etc/shells
209The list of approved shells
210.El
211.Sh SEE ALSO
212.Xr login 1 ,
213.Xr finger 1 ,
214.Xr passwd 1 ,
215.Xr getusershell 3 ,
216.Xr passwd 5 ,
217.Xr pwd_mkdb 8 ,
218.Xr vipw 8
219.Rs
220.%A Robert Morris
221and
222.%A Ken Thompson
223.%T "UNIX Password security"
224.Re
225.Sh BUGS
226User information should (and eventually will) be stored elsewhere.
227.Sh HISTORY
228The
229.Nm
230command appeared in
231.Bx 4.3 Reno .