3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
5
5
.\" Manual: System Management Commands
6
6
.\" Source: System Management Commands
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
11
11
.\" disable justification (adjust text to left margin only)
30
30
\fB\-f\fR, \fB\-\-force\fR
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
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
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\&.
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\&.
47
47
\fB\-h\fR, \fB\-\-help\fR
49
Display help message and exit\.
49
Display help message and exit\&.
52
52
\fB\-r\fR, \fB\-\-remove\fR
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\&.
56
56
The mail spool is defined by the
62
62
.SH "CONFIGURATION"
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:
68
68
\fBMAIL_DIR\fR (string)
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\&.
73
73
\fBMAIL_FILE\fR (string)
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\&.
86
to create, move, or delete the user\'s mail spool\.
86
to create, move, or delete the user\'s mail spool\&.
89
89
\fBMAIL_CHECK_ENAB\fR
91
91
\fIyes\fR, they are also used to define the
93
environment variable\.
93
environment variable\&.
95
95
\fBMAX_MEMBERS_PER_GROUP\fR (number)
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
99
(with the same name, same password, and same GID)\.
101
The default value is 0, meaning that there are no limits in the number of members in a group\.
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\.
105
If you need to enforce such limit, you can use 25\.
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)\&.
101
The default value is 0, meaning that there are no limits in the number of members in a group\&.
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\&.
105
If you need to enforce such limit, you can use 25\&.
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\&.
110
110
\fBUSERDEL_CMD\fR (string)
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)\&.
115
115
\fBUSERGROUPS_ENAB\fR (boolean)
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\.
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\&.
122
122
will remove the user\'s group if it contains no more members, and
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\&.
130
Group account information\.
130
Group account information\&.
133
\fI/etc/login\.defs\fR
133
\fI/etc/login\&.defs\fR
135
Shadow password suite configuration\.
135
Shadow password suite configuration\&.
138
138
\fI/etc/passwd\fR
140
User account information\.
140
User account information\&.
143
143
\fI/etc/shadow\fR
145
Secure user account information\.
145
Secure user account information\&.
147
147
.SH "EXIT VALUES"
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\&.
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\&.
196
196
\fIUSERGROUPS_ENAB\fR
200
\fI/etc/login\.defs\fR,
202
will delete the group with the same name as the user\. To avoid inconsistencies in the passwd and group databases,
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,
202
will delete the group with the same name as the user\&. To avoid inconsistencies in the passwd and group databases,
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
206
option can force the deletion of this group\.
206
option can force the deletion of this group\&.