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