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 | .\" |
b5dc1377 | 6 | .\" @(#)chpass.1 5.8 (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: | |
30 | .Tp Fl a | |
31 | The super-user is allowed to directly supply a user database | |
32 | entry, in the format specified by | |
33 | .Xr passwd 5 , | |
34 | as an argument. | |
35 | This argument must be a colon (``:'') separated list of all the | |
36 | user database fields, although they may be empty. | |
37 | .Tp Fl s | |
38 | The | |
39 | .Fl s | |
40 | option attempts to change the user's shell to | |
41 | .Ar newsh . | |
42 | .Tp | |
43 | .Pp | |
74086f3a | 44 | Possible display items are as follows: |
b5dc1377 CL |
45 | .Pp |
46 | .Dw Home\ Directory: | |
47 | .Dp Login: | |
48 | user's login name | |
49 | .Dp Password: | |
50 | user's encrypted password | |
51 | .Dp Uid: | |
52 | user's id | |
53 | .Dp Gid: | |
54 | user's login group id | |
55 | .Dp Change: | |
56 | password change time | |
57 | .Dp Expire: | |
58 | account expiration time | |
59 | .Dp Class: | |
60 | user's general classification | |
61 | .Dp Home Directory: | |
62 | user's home directory | |
63 | .Dp Shell: | |
64 | user's login shell | |
65 | .Dp Full Name: | |
66 | user's real name | |
67 | .Dp Location: | |
68 | user's normal location | |
69 | .Dp Home Phone: | |
70 | user's home phone | |
71 | .Dp Office Phone: | |
72 | user's office phone | |
73 | .Dp | |
74 | .Pp | |
74086f3a | 75 | The |
b5dc1377 | 76 | .Ar login |
b7eb8299 | 77 | field is the user name used to access the computer account. |
b5dc1377 | 78 | .Pp |
b7eb8299 | 79 | The |
b5dc1377 | 80 | .Ar password |
b7eb8299 | 81 | field contains the encrypted form of the user's password. |
b5dc1377 | 82 | .Pp |
b7eb8299 | 83 | The |
b5dc1377 | 84 | .Ar uid |
b7eb8299 | 85 | field is the number associated with the |
b5dc1377 | 86 | .Ar login |
b7eb8299 KB |
87 | field. |
88 | Both of these fields should be unique across the system (and often | |
89 | across a group of systems) as they control file access. | |
b5dc1377 | 90 | .Pp |
74086f3a KB |
91 | While it is possible to have multiple entries with identical login names |
92 | and/or identical user id's, it is usually a mistake to do so. Routines | |
93 | that manipulate these files will often return only one of the multiple | |
94 | entries, and that one by random selection. | |
b5dc1377 | 95 | .Pp |
74086f3a | 96 | The |
b5dc1377 | 97 | .Ar group |
34dda72c | 98 | field is the group that the user will be placed in at login. |
74086f3a | 99 | Since this system supports multiple groups (see |
b5dc1377 | 100 | .Xr groups 1 ) |
74086f3a KB |
101 | this field currently has little special meaning. |
102 | This field may be filled in with either a number or a group name (see | |
b5dc1377 CL |
103 | .Xr group 5 ) . |
104 | .Pp | |
74086f3a | 105 | The |
b5dc1377 | 106 | .Ar change |
7f554f7b | 107 | field is the date by which the password must be changed. |
b5dc1377 | 108 | .Pp |
74086f3a | 109 | The |
b5dc1377 | 110 | .Ar expire |
7f554f7b | 111 | field is the date on which the account expires. |
b5dc1377 | 112 | .Pp |
74086f3a | 113 | Both the |
b5dc1377 | 114 | .Ar change |
74086f3a | 115 | and |
b5dc1377 | 116 | .Ar expire |
ef97d022 | 117 | fields should be entered in the form ``month day year'' where |
b5dc1377 | 118 | .Ar month |
7f554f7b | 119 | is the month name (the first three characters are sufficient), |
b5dc1377 | 120 | .Ar day |
d264b2a3 | 121 | is the day of the month, and |
b5dc1377 | 122 | .Ar year |
7f554f7b | 123 | is the year. |
b5dc1377 | 124 | .Pp |
74086f3a | 125 | The |
b5dc1377 | 126 | .Ar class |
74086f3a KB |
127 | field is currently unused. In the near future it will be a key to |
128 | a | |
b5dc1377 | 129 | .Xr termcap 5 |
74086f3a | 130 | style database of user attributes. |
b5dc1377 | 131 | .Pp |
74086f3a | 132 | The user's home directory is the full UNIX path name where the user |
34dda72c | 133 | will be placed at login. |
b5dc1377 | 134 | .Pp |
74086f3a KB |
135 | The shell field is the command interpreter the user prefers. |
136 | If the | |
b5dc1377 CL |
137 | .Ar shell |
138 | field is empty, the Bourne shell, | |
139 | .Pa /bin/sh , | |
140 | is assumed. | |
34dda72c KB |
141 | When altering a login shell, and not the super-user, the user |
142 | may not change from a non-standard shell or to a non-standard | |
143 | shell. | |
144 | Non-standard is defined as a shell not found in | |
b5dc1377 CL |
145 | .Pa /etc/shells . |
146 | .Pp | |
74086f3a KB |
147 | The last four fields are for storing the user's full name, office |
148 | location, and home and work telephone numbers. | |
b5dc1377 | 149 | .Pp |
0568f98e | 150 | Once the information has been verified, |
b5dc1377 | 151 | .Nm chpass |
0568f98e | 152 | uses |
b5dc1377 | 153 | .Xr mkpasswd 8 |
0568f98e KB |
154 | to update the user database. This is run in the background, and, |
155 | at very large sites could take several minutes. Until this update | |
156 | is completed, the password file is unavailable for other updates | |
157 | and the new information will not be available to programs. | |
b5dc1377 CL |
158 | .Sh ENVIRONMENT |
159 | The | |
160 | .Xr vi 1 | |
161 | editor will be used unless the environment variable EDITOR is set to | |
162 | an alternate editor. | |
163 | When the editor terminates, the information is re-read and used to | |
164 | update the user database itself. | |
165 | Only the user, or the super-user, may edit the information associated | |
166 | with the user. | |
167 | .Sh FILES | |
168 | .Dw /etc/master.passwd | |
169 | .Di L | |
170 | .Dp Pa /etc/master.passwd | |
171 | The user database | |
172 | .Dp Pa /etc/shells | |
173 | The list of approved shells | |
174 | .Dp | |
175 | .Sh SEE ALSO | |
176 | .Xr login 1 , | |
177 | .Xr finger 1 , | |
178 | .Xr getusershell 3 , | |
179 | .Xr passwd 5 , | |
180 | .Xr mkpasswd 8 , | |
181 | .Xr vipw 8 | |
182 | .Pp | |
0568f98e | 183 | Robert Morris and Ken Thompson, |
b5dc1377 CL |
184 | .Ar UNIX Password security |
185 | .Sh HISTORY | |
186 | First release 4.4 Bsd. | |
187 | .Sh BUGS | |
74086f3a | 188 | User information should (and eventually will) be stored elsewhere. |