Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1988, 1990 The Regents of the University of California. |
2 | .\" 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 5.11 (Berkeley) 3/14/91 | |
33 | .\" | |
34 | .\" PATCHES MAGIC LEVEL PATCH THAT GOT US HERE | |
35 | .\" -------------------- ----- ---------------------- | |
36 | .\" CURRENT PATCH LEVEL: 1 00130 | |
37 | .\" -------------------- ----- ---------------------- | |
38 | .\" | |
39 | .\" 06 Apr 93 Sascha Wildner Misc small fixes | |
40 | .\" | |
41 | .Dd March 14, 1991 | |
42 | .Dt CHPASS 1 | |
43 | .Os | |
44 | .Sh NAME | |
45 | .Nm chpass | |
46 | .Nd add or change user database information | |
47 | .Sh SYNOPSIS | |
48 | chpass | |
49 | .Op Fl a Ar list | |
50 | .Op Fl s Ar shell | |
51 | .Op user | |
52 | .Sh DESCRIPTION | |
53 | .Nm Chpass | |
54 | allows editing of the user database information associated | |
55 | with | |
56 | .Ar user | |
57 | or, by default, the current user. | |
58 | The information is formatted and supplied to an editor for changes. | |
59 | .Pp | |
60 | Only the information that the user is allowed to change is displayed. | |
61 | .Pp | |
62 | The options are as follows: | |
63 | .Bl -tag -width Ds | |
64 | .It Fl a | |
65 | The super-user is allowed to directly supply a user database | |
66 | entry, in the format specified by | |
67 | .Xr passwd 5 , | |
68 | as an argument. | |
69 | This argument must be a colon (``:'') separated list of all the | |
70 | user database fields, although they may be empty. | |
71 | .It Fl s | |
72 | The | |
73 | .Fl s | |
74 | option attempts to change the user's shell to | |
75 | .Ar shell . | |
76 | .El | |
77 | .Pp | |
78 | Possible display items are as follows: | |
79 | .Pp | |
80 | .Bl -tag -width "Home Directory:" -compact -offset indent | |
81 | .It Login: | |
82 | user's login name | |
83 | .It Password: | |
84 | user's encrypted password | |
85 | .It Uid: | |
86 | user's id | |
87 | .It Gid: | |
88 | user's login group id | |
89 | .It Change: | |
90 | password change time | |
91 | .It Expire: | |
92 | account expiration time | |
93 | .It Class: | |
94 | user's general classification | |
95 | .It Home Directory: | |
96 | user's home directory | |
97 | .It Shell: | |
98 | user's login shell | |
99 | .It Full Name: | |
100 | user's real name | |
101 | .It Location: | |
102 | user's normal location | |
103 | .It Home Phone: | |
104 | user's home phone | |
105 | .It Office Phone: | |
106 | user's office phone | |
107 | .El | |
108 | .Pp | |
109 | The | |
110 | .Ar login | |
111 | field is the user name used to access the computer account. | |
112 | .Pp | |
113 | The | |
114 | .Ar password | |
115 | field contains the encrypted form of the user's password. | |
116 | .Pp | |
117 | The | |
118 | .Ar uid | |
119 | field is the number associated with the | |
120 | .Ar login | |
121 | field. | |
122 | Both of these fields should be unique across the system (and often | |
123 | across a group of systems) as they control file access. | |
124 | .Pp | |
125 | While it is possible to have multiple entries with identical login names | |
126 | and/or identical user id's, it is usually a mistake to do so. Routines | |
127 | that manipulate these files will often return only one of the multiple | |
128 | entries, and that one by random selection. | |
129 | .Pp | |
130 | The | |
131 | .Ar group | |
132 | field is the group that the user will be placed in at login. | |
133 | Since this system supports multiple groups (see | |
134 | .Xr groups 1 ) | |
135 | this field currently has little special meaning. | |
136 | This field may be filled in with either a number or a group name (see | |
137 | .Xr group 5 ) . | |
138 | .Pp | |
139 | The | |
140 | .Ar change | |
141 | field is the date by which the password must be changed. | |
142 | .Pp | |
143 | The | |
144 | .Ar expire | |
145 | field is the date on which the account expires. | |
146 | .Pp | |
147 | Both the | |
148 | .Ar change | |
149 | and | |
150 | .Ar expire | |
151 | fields should be entered in the form ``month day year'' where | |
152 | .Ar month | |
153 | is the month name (the first three characters are sufficient), | |
154 | .Ar day | |
155 | is the day of the month, and | |
156 | .Ar year | |
157 | is the year. | |
158 | .Pp | |
159 | The | |
160 | .Ar class | |
161 | field is currently unused. In the near future it will be a key to | |
162 | a | |
163 | .Xr termcap 5 | |
164 | style database of user attributes. | |
165 | .Pp | |
166 | The user's | |
167 | .Ar home directory | |
168 | is the full UNIX path name where the user | |
169 | will be placed at login. | |
170 | .Pp | |
171 | The | |
172 | .Ar shell | |
173 | field is the command interpreter the user prefers. | |
174 | If the | |
175 | .Ar shell | |
176 | field is empty, the Bourne shell, | |
177 | .Pa /bin/sh , | |
178 | is assumed. | |
179 | When altering a login shell, and not the super-user, the user | |
180 | may not change from a non-standard shell or to a non-standard | |
181 | shell. | |
182 | Non-standard is defined as a shell not found in | |
183 | .Pa /etc/shells . | |
184 | .Pp | |
185 | The last four fields are for storing the user's | |
186 | .Ar full name , office location , | |
187 | and | |
188 | .Ar home | |
189 | and | |
190 | .Ar work telephone | |
191 | numbers. | |
192 | .Pp | |
193 | Once the information has been verified, | |
194 | .Nm chpass | |
195 | uses | |
196 | .Xr pwd_mkdb 8 | |
197 | to update the user database. | |
198 | .Sh ENVIRONMENT | |
199 | The | |
200 | .Xr vi 1 | |
201 | editor will be used unless the environment variable EDITOR is set to | |
202 | an alternate editor. | |
203 | When the editor terminates, the information is re-read and used to | |
204 | update the user database itself. | |
205 | Only the user, or the super-user, may edit the information associated | |
206 | with the user. | |
207 | .Sh FILES | |
208 | .Bl -tag -width /etc/master.passwd -compact | |
209 | .It Pa /etc/master.passwd | |
210 | The user database | |
211 | .It Pa /etc/passwd | |
212 | A Version 7 format password file | |
213 | .It Pa /etc/chpass.XXXXXX | |
214 | Temporary copy of the password file | |
215 | .It Pa /etc/shells | |
216 | The list of approved shells | |
217 | .El | |
218 | .Sh SEE ALSO | |
219 | .Xr login 1 , | |
220 | .Xr finger 1 , | |
221 | .Xr passwd 1 , | |
222 | .Xr getusershell 3 , | |
223 | .Xr passwd 5 , | |
224 | .Xr pwd_mkdb 8 , | |
225 | .Xr vipw 8 | |
226 | .Rs | |
227 | .%A Robert Morris | |
228 | .%A Ken Thompson | |
229 | .%T "UNIX Password security" | |
230 | .Re | |
231 | .Sh BUGS | |
232 | User information should (and eventually will) be stored elsewhere. | |
233 | .Sh HISTORY | |
234 | The | |
235 | .Nm | |
236 | command appeared in | |
237 | .Bx 4.3 Reno . |