Commit | Line | Data |
---|---|---|
0568f98e KB |
1 | .\" Copyright (c) 1988 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms are permitted | |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
b7eb8299 | 16 | .\" @(#)chpass.1 5.6 (Berkeley) %G% |
0568f98e KB |
17 | .\" |
18 | .TH CHPASS 1 "" | |
19 | .UC 4 | |
20 | .SH NAME | |
21 | chpass \- add or change user database information | |
22 | .SH SYNOPSIS | |
b7eb8299 | 23 | chpass [ -a list ] [ user ] |
0568f98e KB |
24 | .SH DESCRIPTION |
25 | .I Chpass | |
26 | allows editing of the user database information associated | |
27 | with | |
28 | .I user | |
29 | or, by default, the current user. | |
30 | The information is formatted and supplied to an editor for changes. | |
31 | The | |
32 | .I vi | |
b7eb8299 | 33 | editor will be used unless the environmental variable EDITOR selects |
0568f98e KB |
34 | an alternate editor. |
35 | When the editor terminates, the information is re-read and used to | |
36 | update the user database itself. | |
37 | Only the user, or the super-user, may edit the information associated | |
38 | with the user. | |
39 | .PP | |
40 | Only the information that the user is allowed to change is displayed. | |
41 | .PP | |
74086f3a KB |
42 | Possible display items are as follows: |
43 | .PP | |
44 | .RS | |
45 | Login: user's login name | |
b7eb8299 | 46 | Password: user's encrypted password |
74086f3a KB |
47 | Uid: user's id |
48 | Gid: user's login group id | |
49 | Change: password change time | |
50 | Expire: account expiration time | |
51 | Class: user's general classification | |
52 | Home Directory: user's home directory | |
53 | Shell: user's login shell | |
54 | Full Name: user's real name | |
55 | Location: user's normal location | |
56 | Home Phone: user's home phone | |
57 | Office Phone: user's office phone | |
58 | .RE | |
59 | .PP | |
60 | .PP | |
61 | The | |
b7eb8299 KB |
62 | .I login |
63 | field is the user name used to access the computer account. | |
64 | .PP | |
65 | The | |
66 | .I password | |
67 | field contains the encrypted form of the user's password. | |
68 | .PP | |
69 | The | |
74086f3a | 70 | .I uid |
b7eb8299 KB |
71 | field is the number associated with the |
72 | .I login | |
73 | field. | |
74 | Both of these fields should be unique across the system (and often | |
75 | across a group of systems) as they control file access. | |
74086f3a KB |
76 | .PP |
77 | While it is possible to have multiple entries with identical login names | |
78 | and/or identical user id's, it is usually a mistake to do so. Routines | |
79 | that manipulate these files will often return only one of the multiple | |
80 | entries, and that one by random selection. | |
81 | .PP | |
82 | The | |
83 | .I group | |
84 | field is the group that the user will be placed in upon login. | |
85 | Since this system supports multiple groups (see | |
86 | .IR groups (1)) | |
87 | this field currently has little special meaning. | |
88 | This field may be filled in with either a number or a group name (see | |
89 | .IR group (5)). | |
90 | .PP | |
91 | The | |
92 | .I change | |
7f554f7b | 93 | field is the date by which the password must be changed. |
74086f3a KB |
94 | .PP |
95 | The | |
96 | .I expire | |
7f554f7b | 97 | field is the date on which the account expires. |
74086f3a KB |
98 | .PP |
99 | Both the | |
100 | .I change | |
101 | and | |
102 | .I expire | |
ef97d022 | 103 | fields should be entered in the form ``month day year'' where |
74086f3a | 104 | .I month |
7f554f7b | 105 | is the month name (the first three characters are sufficient), |
ef97d022 | 106 | .I day |
d264b2a3 | 107 | is the day of the month, and |
ef97d022 | 108 | .I year |
7f554f7b | 109 | is the year. |
74086f3a KB |
110 | .PP |
111 | The | |
112 | .I class | |
113 | field is currently unused. In the near future it will be a key to | |
114 | a | |
115 | .IR termcap (5) | |
116 | style database of user attributes. | |
117 | .PP | |
118 | The user's home directory is the full UNIX path name where the user | |
119 | will be placed on login. | |
120 | .PP | |
121 | The shell field is the command interpreter the user prefers. | |
122 | If the | |
123 | .I shell | |
124 | field is empty, the Bourne shell (\fI/bin/sh\fP) is assumed. | |
125 | .PP | |
0568f98e KB |
126 | When altering a login shell, and not the super-user, the user must |
127 | select an approved shell from the list in | |
128 | .IR /etc/shells . | |
129 | .PP | |
74086f3a KB |
130 | The last four fields are for storing the user's full name, office |
131 | location, and home and work telephone numbers. | |
132 | .PP | |
b7eb8299 KB |
133 | The super-user is also allowed to directly supply a user database |
134 | entry, in the format specified by | |
135 | .IR passwd (5), | |
136 | as an argument to the | |
137 | .I -a | |
138 | option. | |
139 | This argument must be a colon (``:'') separated list of all the | |
140 | user database fields, although they may be empty. | |
0568f98e KB |
141 | .PP |
142 | Once the information has been verified, | |
143 | .I chpass | |
144 | uses | |
145 | .IR mkpasswd (8) | |
146 | to update the user database. This is run in the background, and, | |
147 | at very large sites could take several minutes. Until this update | |
148 | is completed, the password file is unavailable for other updates | |
149 | and the new information will not be available to programs. | |
150 | .SH FILES | |
151 | .DT | |
152 | /etc/master.passwd The user database | |
153 | /etc/shells The list of approved shells | |
154 | .RE | |
155 | .SH "SEE ALSO" | |
156 | login(1), finger(1), getusershell(3), passwd(5), mkpasswd(8), vipw(8) | |
157 | .br | |
158 | Robert Morris and Ken Thompson, | |
159 | .I UNIX password security | |
74086f3a KB |
160 | .SH BUGS |
161 | User information should (and eventually will) be stored elsewhere. |