3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6 .\" Manual: Systemhanteringskommandon
7 .\" Source: Systemhanteringskommandon
10 .TH "USERDEL" "8" "16-02-2011" "Systemhanteringskommandon" "Systemhanteringskommandon"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 userdel \- ta bort ett anv\(:andarkonto och relaterade filer
33 .HP \w'\fBuserdel\fR\ 'u
34 \fBuserdel\fR [flaggor] \fIINLOGGNINGSNAMN\fR
39 command modifies the system account files, deleting all entries that refer to the user name
40 \fILOGIN\fR\&. The named user must exist\&.
43 Flaggorna som g\(:aller f\(:or kommandot
47 \fB\-f\fR, \fB\-\-force\fR
49 This option forces the removal of the user account, even if the user is still logged in\&. It also forces
51 to remove the user\*(Aqs 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
57 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\&.
60 Denna flagga \(:ar farlig och kan g\(:ora att ditt system f\(:ors\(:atts i ett inkonsistent tillst\(oand\&.
63 \fB\-h\fR, \fB\-\-help\fR
65 Visa hj\(:alpmeddelande och avsluta\&.
68 \fB\-r\fR, \fB\-\-remove\fR
70 Files in the user\*(Aqs home directory will be removed along with the home directory itself and the user\*(Aqs mail spool\&. Files located in other file systems will have to be searched for and deleted manually\&.
72 The mail spool is defined by the
80 The following configuration variables in
82 change the behavior of this tool:
84 \fBMAIL_DIR\fR (string)
86 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\&.
89 \fBMAIL_FILE\fR (string)
91 Defines the location of the users mail spool files relatively to their home directory\&.
102 to create, move, or delete the user\*(Aqs mail spool\&.
105 \fBMAIL_CHECK_ENAB\fR
107 \fIyes\fR, they are also used to define the
109 environment variable\&.
111 \fBMAX_MEMBERS_PER_GROUP\fR (number)
113 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
115 (with the same name, same password, and same GID)\&.
117 The default value is 0, meaning that there are no limits in the number of members in a group\&.
119 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\&.
121 If you need to enforce such limit, you can use 25\&.
123 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\&.
126 \fBUSERDEL_CMD\fR (string)
128 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)\&.
130 The return code of the script is not taken into account\&.
132 Here is an example script, which removes the user\*(Aqs cron, at and print jobs:
140 # Check for the required argument\&.
142 echo "Usage: $0 username"
146 # Remove cron jobs\&.
150 # Note that it will remove any jobs owned by the same UID,
151 # even if it was shared by a different username\&.
152 AT_SPOOL_DIR=/var/spool/cron/atjobs
153 find $AT_SPOOL_DIR \-name "[^\&.]*" \-type f \-user $1 \-delete \e;
155 # Remove print jobs\&.
168 \fBUSERGROUPS_ENAB\fR (boolean)
170 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\&.
175 will remove the user\*(Aqs group if it contains no more members, and
177 will create by default a group with the name of the user\&.
183 Gruppkontoinformation\&.
188 Shadow password suite configuration\&.
193 Anv\(:andarkontoinformation\&.
198 S\(:aker anv\(:andarkontoinformation\&.
200 .SH "AVSLUTNINGSV\(:ARDEN"
204 avslutas med f\(:oljande v\(:arden:
213 kan inte uppdatera l\(:osenordsfilen
218 ogiltig kommandosyntax
223 angiven anv\(:andare finns inte
228 anv\(:andaren \(:ar f\(:or n\(:arvarande inloggad
233 kan inte uppdatera gruppfilen
238 kan inte ta bort hemkatalogen
244 will not allow you to remove an account if there are running processes which belong to this account\&. In that case, you may have to kill those processes or lock the user\*(Aqs password or account and remove the account later\&. The
246 option can force the deletion of this account\&.
248 You should manually check all file systems to ensure that no files remain owned by this user\&.
250 Du f\(oar inte ta bort n\(oagra NIS\-attribut p\(oa en NIS\-klient\&. Detta m\(oaste genomf\(:oras p\(oa NIS\-servern\&.
253 \fBUSERGROUPS_ENAB\fR
259 will delete the group with the same name as the user\&. To avoid inconsistencies in the passwd and group databases,
261 will check that this group is not used as a primary group for another user, and will just warn without deleting the group otherwise\&. The
263 option can force the deletion of this group\&.