Commit | Line | Data |
---|---|---|
b5dc1377 | 1 | .\" Copyright (c) 1988, 1990 The Regents of the University of California. |
0568f98e KB |
2 | .\" All rights reserved. |
3 | .\" | |
b5dc1377 | 4 | .\" %sccs.include.redist.man% |
0568f98e | 5 | .\" |
bc3d7b01 | 6 | .\" @(#)chpass.1 5.10 (Berkeley) %G% |
0568f98e | 7 | .\" |
b5dc1377 CL |
8 | .Dd |
9 | .Dt CHPASS 1 | |
10 | .Os BSD 4.4 | |
11 | .Sh NAME | |
12 | .Nm chpass | |
13 | .Nd add or change user database information | |
14 | .Sh SYNOPSIS | |
15 | chpass | |
16 | .Op Fl a Ar list | |
17 | .Op Fl s Ar shell | |
18 | .Op user | |
19 | .Sh DESCRIPTION | |
20 | .Nm Chpass | |
0568f98e KB |
21 | allows editing of the user database information associated |
22 | with | |
b5dc1377 | 23 | .Ar user |
0568f98e KB |
24 | or, by default, the current user. |
25 | The information is formatted and supplied to an editor for changes. | |
b5dc1377 | 26 | .Pp |
0568f98e | 27 | Only the information that the user is allowed to change is displayed. |
b5dc1377 CL |
28 | .Pp |
29 | The options are as follows: | |
5325ced3 | 30 | .Tw Ds |
b5dc1377 CL |
31 | .Tp Fl a |
32 | The super-user is allowed to directly supply a user database | |
33 | entry, in the format specified by | |
34 | .Xr passwd 5 , | |
35 | as an argument. | |
36 | This argument must be a colon (``:'') separated list of all the | |
37 | user database fields, although they may be empty. | |
38 | .Tp Fl s | |
39 | The | |
40 | .Fl s | |
41 | option attempts to change the user's shell to | |
42 | .Ar newsh . | |
43 | .Tp | |
44 | .Pp | |
74086f3a | 45 | Possible display items are as follows: |
b5dc1377 CL |
46 | .Pp |
47 | .Dw Home\ Directory: | |
48 | .Dp Login: | |
49 | user's login name | |
50 | .Dp Password: | |
51 | user's encrypted password | |
52 | .Dp Uid: | |
53 | user's id | |
54 | .Dp Gid: | |
55 | user's login group id | |
56 | .Dp Change: | |
57 | password change time | |
58 | .Dp Expire: | |
59 | account expiration time | |
60 | .Dp Class: | |
61 | user's general classification | |
62 | .Dp Home Directory: | |
63 | user's home directory | |
64 | .Dp Shell: | |
65 | user's login shell | |
66 | .Dp Full Name: | |
67 | user's real name | |
68 | .Dp Location: | |
69 | user's normal location | |
70 | .Dp Home Phone: | |
71 | user's home phone | |
72 | .Dp Office Phone: | |
73 | user's office phone | |
74 | .Dp | |
75 | .Pp | |
74086f3a | 76 | The |
b5dc1377 | 77 | .Ar login |
b7eb8299 | 78 | field is the user name used to access the computer account. |
b5dc1377 | 79 | .Pp |
b7eb8299 | 80 | The |
b5dc1377 | 81 | .Ar password |
b7eb8299 | 82 | field contains the encrypted form of the user's password. |
b5dc1377 | 83 | .Pp |
b7eb8299 | 84 | The |
b5dc1377 | 85 | .Ar uid |
b7eb8299 | 86 | field is the number associated with the |
b5dc1377 | 87 | .Ar login |
b7eb8299 KB |
88 | field. |
89 | Both of these fields should be unique across the system (and often | |
90 | across a group of systems) as they control file access. | |
b5dc1377 | 91 | .Pp |
74086f3a KB |
92 | While it is possible to have multiple entries with identical login names |
93 | and/or identical user id's, it is usually a mistake to do so. Routines | |
94 | that manipulate these files will often return only one of the multiple | |
95 | entries, and that one by random selection. | |
b5dc1377 | 96 | .Pp |
74086f3a | 97 | The |
b5dc1377 | 98 | .Ar group |
34dda72c | 99 | field is the group that the user will be placed in at login. |
74086f3a | 100 | Since this system supports multiple groups (see |
b5dc1377 | 101 | .Xr groups 1 ) |
74086f3a KB |
102 | this field currently has little special meaning. |
103 | This field may be filled in with either a number or a group name (see | |
b5dc1377 CL |
104 | .Xr group 5 ) . |
105 | .Pp | |
74086f3a | 106 | The |
b5dc1377 | 107 | .Ar change |
7f554f7b | 108 | field is the date by which the password must be changed. |
b5dc1377 | 109 | .Pp |
74086f3a | 110 | The |
b5dc1377 | 111 | .Ar expire |
7f554f7b | 112 | field is the date on which the account expires. |
b5dc1377 | 113 | .Pp |
74086f3a | 114 | Both the |
b5dc1377 | 115 | .Ar change |
74086f3a | 116 | and |
b5dc1377 | 117 | .Ar expire |
ef97d022 | 118 | fields should be entered in the form ``month day year'' where |
b5dc1377 | 119 | .Ar month |
7f554f7b | 120 | is the month name (the first three characters are sufficient), |
b5dc1377 | 121 | .Ar day |
d264b2a3 | 122 | is the day of the month, and |
b5dc1377 | 123 | .Ar year |
7f554f7b | 124 | is the year. |
5325ced3 | 125 | .bp |
74086f3a | 126 | The |
b5dc1377 | 127 | .Ar class |
74086f3a KB |
128 | field is currently unused. In the near future it will be a key to |
129 | a | |
b5dc1377 | 130 | .Xr termcap 5 |
74086f3a | 131 | style database of user attributes. |
b5dc1377 | 132 | .Pp |
5325ced3 CL |
133 | The user's |
134 | .Ar home directory | |
135 | is the full UNIX path name where the user | |
34dda72c | 136 | will be placed at login. |
b5dc1377 | 137 | .Pp |
5325ced3 CL |
138 | The |
139 | .Ar shell | |
140 | field is the command interpreter the user prefers. | |
74086f3a | 141 | If the |
b5dc1377 CL |
142 | .Ar shell |
143 | field is empty, the Bourne shell, | |
144 | .Pa /bin/sh , | |
145 | is assumed. | |
34dda72c KB |
146 | When altering a login shell, and not the super-user, the user |
147 | may not change from a non-standard shell or to a non-standard | |
148 | shell. | |
149 | Non-standard is defined as a shell not found in | |
b5dc1377 CL |
150 | .Pa /etc/shells . |
151 | .Pp | |
5325ced3 CL |
152 | The last four fields are for storing the user's |
153 | .Ar full name , office location , | |
154 | and | |
155 | .Ar home | |
156 | and | |
157 | .Ar work telephone | |
158 | numbers. | |
b5dc1377 | 159 | .Pp |
0568f98e | 160 | Once the information has been verified, |
b5dc1377 | 161 | .Nm chpass |
0568f98e | 162 | uses |
bc3d7b01 KB |
163 | .Xr pwd_mkdb 8 |
164 | to update the user database. | |
b5dc1377 CL |
165 | .Sh ENVIRONMENT |
166 | The | |
167 | .Xr vi 1 | |
168 | editor will be used unless the environment variable EDITOR is set to | |
169 | an alternate editor. | |
170 | When the editor terminates, the information is re-read and used to | |
171 | update the user database itself. | |
172 | Only the user, or the super-user, may edit the information associated | |
173 | with the user. | |
174 | .Sh FILES | |
175 | .Dw /etc/master.passwd | |
176 | .Di L | |
177 | .Dp Pa /etc/master.passwd | |
178 | The user database | |
bc3d7b01 KB |
179 | .Dp Pa /etc/passwd |
180 | A Version 7 format password file | |
181 | .Dp Pa /etc/chpass.XXXXXX | |
182 | Temporary copy of the password file | |
b5dc1377 CL |
183 | .Dp Pa /etc/shells |
184 | The list of approved shells | |
185 | .Dp | |
186 | .Sh SEE ALSO | |
187 | .Xr login 1 , | |
188 | .Xr finger 1 , | |
bc3d7b01 | 189 | .Xr passwd 1 , |
b5dc1377 CL |
190 | .Xr getusershell 3 , |
191 | .Xr passwd 5 , | |
bc3d7b01 | 192 | .Xr pwd_mkdb 8 , |
b5dc1377 CL |
193 | .Xr vipw 8 |
194 | .Pp | |
0568f98e | 195 | Robert Morris and Ken Thompson, |
b5dc1377 CL |
196 | .Ar UNIX Password security |
197 | .Sh HISTORY | |
5325ced3 | 198 | First release 4.3 Reno BSD. |
b5dc1377 | 199 | .Sh BUGS |
74086f3a | 200 | User information should (and eventually will) be stored elsewhere. |