~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to man/userdel.8

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-05-05 09:45:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505094521-wpk2wn3q7957tlah
Tags: 1:4.1.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/stdout-encrypted-password.patch: chpasswd can report
    password hashes on stdout (debian bug 505640).
  - debian/login.pam: Enable SELinux support (debian bug 527106).
  - debian/securetty.linux: support Freescale MX-series (debian bug 527095).
* Add debian/patches/300_lastlog_failure: fixed upstream (debian bug 524873).
* Drop debian/patches/593_omit_lastchange_field_if_clock_is_misset: fixed
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: userdel
2
2
.\"    Author: 
3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4
 
.\"      Date: 04/03/2008
 
4
.\"      Date: 04/15/2009
5
5
.\"    Manual: System Management Commands
6
6
.\"    Source: System Management Commands
7
7
.\"
8
 
.TH "USERDEL" "8" "04/03/2008" "System Management Commands" "System Management Commands"
 
8
.TH "USERDEL" "8" "04/15/2009" "System Management Commands" "System Management Commands"
9
9
.\" disable hyphenation
10
10
.nh
11
11
.\" disable justification (adjust text to left margin only)
20
20
The
21
21
\fBuserdel\fR
22
22
command modifies the system account files, deleting all entries that refer to the user name
23
 
\fILOGIN\fR\. The named user must exist\.
 
23
\fILOGIN\fR\&. The named user must exist\&.
24
24
.SH "OPTIONS"
25
25
.PP
26
26
The options which apply to the
29
29
.PP
30
30
\fB\-f\fR, \fB\-\-force\fR
31
31
.RS 4
32
 
This option forces the removal of the user account, even if the user is still logged in\. It also forces
 
32
This option forces the removal of the user account, even if the user is still logged in\&. It also forces
33
33
\fBuserdel\fR
34
 
to remove the user\'s home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user\. If
 
34
to remove the user\'s home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user\&. If
35
35
\fIUSERGROUPS_ENAB\fR
36
36
is defined to
37
37
\fIyes\fR
38
38
in
39
 
\fI/etc/login\.defs\fR
40
 
and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user\.
 
39
\fI/etc/login\&.defs\fR
 
40
and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user\&.
41
41
.sp
42
42
 
43
43
\fINote:\fR
44
 
This option is dangerous and may leave your system in an inconsistent state\.
 
44
This option is dangerous and may leave your system in an inconsistent state\&.
45
45
.RE
46
46
.PP
47
47
\fB\-h\fR, \fB\-\-help\fR
48
48
.RS 4
49
 
Display help message and exit\.
 
49
Display help message and exit\&.
50
50
.RE
51
51
.PP
52
52
\fB\-r\fR, \fB\-\-remove\fR
53
53
.RS 4
54
 
Files in the user\'s home directory will be removed along with the home directory itself and the user\'s mail spool\. Files located in other file systems will have to be searched for and deleted manually\.
 
54
Files in the user\'s home directory will be removed along with the home directory itself and the user\'s mail spool\&. Files located in other file systems will have to be searched for and deleted manually\&.
55
55
.sp
56
56
The mail spool is defined by the
57
57
\fIMAIL_DIR\fR
58
58
variable in the
59
 
\fIlogin\.defs\fR
60
 
file\.
 
59
\fIlogin\&.defs\fR
 
60
file\&.
61
61
.RE
62
62
.SH "CONFIGURATION"
63
63
.PP
64
64
The following configuration variables in
65
 
\fI/etc/login\.defs\fR
 
65
\fI/etc/login\&.defs\fR
66
66
change the behavior of this tool:
67
67
.PP
68
68
\fBMAIL_DIR\fR (string)
69
69
.RS 4
70
 
The mail spool directory\. This is needed to manipulate the mailbox when its corresponding user account is modified or deleted\. If not specified, a compile\-time default is used\.
 
70
The mail spool directory\&. This is needed to manipulate the mailbox when its corresponding user account is modified or deleted\&. If not specified, a compile\-time default is used\&.
71
71
.RE
72
72
.PP
73
73
\fBMAIL_FILE\fR (string)
74
74
.RS 4
75
 
Defines the location of the users mail spool files relatively to their home directory\.
 
75
Defines the location of the users mail spool files relatively to their home directory\&.
76
76
.RE
77
77
.PP
78
78
The
83
83
\fBuseradd\fR,
84
84
\fBusermod\fR, and
85
85
\fBuserdel\fR
86
 
to create, move, or delete the user\'s mail spool\.
 
86
to create, move, or delete the user\'s mail spool\&.
87
87
.PP
88
88
If
89
89
\fBMAIL_CHECK_ENAB\fR
90
90
is set to
91
91
\fIyes\fR, they are also used to define the
92
92
\fBMAIL\fR
93
 
environment variable\.
 
93
environment variable\&.
94
94
.PP
95
95
\fBMAX_MEMBERS_PER_GROUP\fR (number)
96
96
.RS 4
97
 
Maximum members per group entry\. When the maximum is reached, a new group entry (line) is started in
 
97
Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
98
98
\fI/etc/group\fR
99
 
(with the same name, same password, and same GID)\.
100
 
.sp
101
 
The default value is 0, meaning that there are no limits in the number of members in a group\.
102
 
.sp
103
 
This feature (split group) permits to limit the length of lines in the group file\. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\.
104
 
.sp
105
 
If you need to enforce such limit, you can use 25\.
106
 
.sp
107
 
Note: split groups may not be supported by all tools (even in the Shadow toolsuite\. You should not use this variable unless you really need it\.
 
99
(with the same name, same password, and same GID)\&.
 
100
.sp
 
101
The default value is 0, meaning that there are no limits in the number of members in a group\&.
 
102
.sp
 
103
This feature (split group) permits to limit the length of lines in the group file\&. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\&.
 
104
.sp
 
105
If you need to enforce such limit, you can use 25\&.
 
106
.sp
 
107
Note: split groups may not be supported by all tools (even in the Shadow toolsuite)\&. You should not use this variable unless you really need it\&.
108
108
.RE
109
109
.PP
110
110
\fBUSERDEL_CMD\fR (string)
111
111
.RS 4
112
 
If defined, this command is run when removing a user\. It should remove any at/cron/print jobs etc\. owned by the user to be removed (passed as the first argument)\.
 
112
If defined, this command is run when removing a user\&. It should remove any at/cron/print jobs etc\&. owned by the user to be removed (passed as the first argument)\&.
113
113
.RE
114
114
.PP
115
115
\fBUSERGROUPS_ENAB\fR (boolean)
116
116
.RS 4
117
 
Enable setting of the umask group bits to be the same as owner bits (examples: 022 \-> 002, 077 \-> 007) for non\-root users, if the uid is the same as gid, and username is the same as the primary group name\.
118
 
 
 
117
Enable setting of the umask group bits to be the same as owner bits (examples: 022 \-> 002, 077 \-> 007) for non\-root users, if the uid is the same as gid, and username is the same as the primary group name\&.
 
118
.sp
119
119
If set to
120
120
\fIyes\fR,
121
121
\fBuserdel\fR
122
122
will remove the user\'s group if it contains no more members, and
123
123
\fBuseradd\fR
124
 
will create by default a group with the name of the user\.
 
124
will create by default a group with the name of the user\&.
125
125
.RE
126
126
.SH "FILES"
127
127
.PP
128
128
\fI/etc/group\fR
129
129
.RS 4
130
 
Group account information\.
 
130
Group account information\&.
131
131
.RE
132
132
.PP
133
 
\fI/etc/login\.defs\fR
 
133
\fI/etc/login\&.defs\fR
134
134
.RS 4
135
 
Shadow password suite configuration\.
 
135
Shadow password suite configuration\&.
136
136
.RE
137
137
.PP
138
138
\fI/etc/passwd\fR
139
139
.RS 4
140
 
User account information\.
 
140
User account information\&.
141
141
.RE
142
142
.PP
143
143
\fI/etc/shadow\fR
144
144
.RS 4
145
 
Secure user account information\.
 
145
Secure user account information\&.
146
146
.RE
147
147
.SH "EXIT VALUES"
148
148
.PP
188
188
.PP
189
189
 
190
190
\fBuserdel\fR
191
 
will not allow you to remove an account if the user is currently logged in\. You must kill any running processes which belong to an account that you are deleting\.
 
191
will not allow you to remove an account if the user is currently logged in\&. You must kill any running processes which belong to an account that you are deleting\&.
192
192
.PP
193
 
You may not remove any NIS attributes on a NIS client\. This must be performed on the NIS server\.
 
193
You may not remove any NIS attributes on a NIS client\&. This must be performed on the NIS server\&.
194
194
.PP
195
195
If
196
196
\fIUSERGROUPS_ENAB\fR
197
197
is defined to
198
198
\fIyes\fR
199
199
in
200
 
\fI/etc/login\.defs\fR,
201
 
\fBuserdel\fR
202
 
will delete the group with the same name as the user\. To avoid inconsistencies in the passwd and group databases,
203
 
\fBuserdel\fR
204
 
will check that this group is not used as a primary group for another user, and will just warn without deleting the user otherwise\. The
 
200
\fI/etc/login\&.defs\fR,
 
201
\fBuserdel\fR
 
202
will delete the group with the same name as the user\&. To avoid inconsistencies in the passwd and group databases,
 
203
\fBuserdel\fR
 
204
will check that this group is not used as a primary group for another user, and will just warn without deleting the user otherwise\&. The
205
205
\fB\-f\fR
206
 
option can force the deletion of this group\.
 
206
option can force the deletion of this group\&.
207
207
.SH "SEE ALSO"
208
208
.PP
209
209
\fBchfn\fR(1),
215
215
\fBgroupdel\fR(8),
216
216
\fBgroupmod\fR(8),
217
217
\fBuseradd\fR(8),
218
 
\fBusermod\fR(8)\.
 
218
\fBusermod\fR(8)\&.