Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / it / userdel.8
1 '\" t
2 .\"     Title: userdel
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 16/02/2011
6 .\"    Manual: System Management Commands
7 .\"    Source: System Management Commands
8 .\"  Language: Italian
9 .\"
10 .TH "USERDEL" "8" "16/02/2011" "System Management Commands" "System Management Commands"
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NOME"
31 userdel \- Rimuove l\*(Aqaccount di un utente ed i file relativi
32 .SH "SINOSSI"
33 .HP \w'\fBuserdel\fR\ 'u
34 \fBuserdel\fR [opzioni] \fILOGIN\fR
35 .SH "DESCRIZIONE"
36 .PP
37 The
38 \fBuserdel\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\&.
41 .SH "OPZIONI"
42 .PP
43 Il comando
44 \fBuserdel\fR
45 accetta le seguenti opzioni:
46 .PP
47 \fB\-f\fR, \fB\-\-force\fR
48 .RS 4
49 This option forces the removal of the user account, even if the user is still logged in\&. It also forces
50 \fBuserdel\fR
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
52 \fBUSERGROUPS_ENAB\fR
53 is defined to
54 \fIyes\fR
55 in
56 /etc/login\&.defs
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\&.
58 .sp
59
60 \fINote:\fR
61 This option is dangerous and may leave your system in an inconsistent state\&.
62 .RE
63 .PP
64 \fB\-h\fR, \fB\-\-help\fR
65 .RS 4
66 Mostra un messaggio di aiuto ed esce\&.
67 .RE
68 .PP
69 \fB\-r\fR, \fB\-\-remove\fR
70 .RS 4
71 I file nella home directory dell\*(Aqutente verranno rimossi insieme alla home directory stessa\&. I file collocati in altri file system dovranno essere ricercati e rimossi manualmente\&.
72 .sp
73 The mail spool is defined by the
74 \fBMAIL_DIR\fR
75 variable in the
76 login\&.defs
77 file\&.
78 .RE
79 .SH "CONFIGURATION"
80 .PP
81 The following configuration variables in
82 /etc/login\&.defs
83 change the behavior of this tool:
84 .PP
85 \fBMAIL_DIR\fR (string)
86 .RS 4
87 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\&.
88 .RE
89 .PP
90 \fBMAIL_FILE\fR (string)
91 .RS 4
92 Defines the location of the users mail spool files relatively to their home directory\&.
93 .RE
94 .PP
95 The
96 \fBMAIL_DIR\fR
97 and
98 \fBMAIL_FILE\fR
99 variables are used by
100 \fBuseradd\fR,
101 \fBusermod\fR, and
102 \fBuserdel\fR
103 to create, move, or delete the user\*(Aqs mail spool\&.
104 .PP
105 If
106 \fBMAIL_CHECK_ENAB\fR
107 is set to
108 \fIyes\fR, they are also used to define the
109 \fBMAIL\fR
110 environment variable\&.
111 .PP
112 \fBMAX_MEMBERS_PER_GROUP\fR (number)
113 .RS 4
114 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
115 /etc/group
116 (with the same name, same password, and same GID)\&.
117 .sp
118 The default value is 0, meaning that there are no limits in the number of members in a group\&.
119 .sp
120 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 .sp
122 If you need to enforce such limit, you can use 25\&.
123 .sp
124 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\&.
125 .RE
126 .PP
127 \fBUSERDEL_CMD\fR (string)
128 .RS 4
129 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 .sp
131 The return code of the script is not taken into account\&.
132 .sp
133 Here is an example script, which removes the user\*(Aqs cron, at and print jobs:
134 .sp
135 .if n \{\
136 .RS 4
137 .\}
138 .nf
139 #! /bin/sh
140
141 # Check for the required argument\&.
142 if [ $# != 1 ]; then
143         echo "Usage: $0 username"
144         exit 1
145 fi
146
147 # Remove cron jobs\&.
148 crontab \-r \-u $1
149
150 # Remove at jobs\&.
151 # Note that it will remove any jobs owned by the same UID,
152 # even if it was shared by a different username\&.
153 AT_SPOOL_DIR=/var/spool/cron/atjobs
154 find $AT_SPOOL_DIR \-name "[^\&.]*" \-type f \-user $1 \-delete \e;
155
156 # Remove print jobs\&.
157 lprm $1
158
159 # All done\&.
160 exit 0
161       
162 .fi
163 .if n \{\
164 .RE
165 .\}
166 .sp
167 .RE
168 .PP
169 \fBUSERGROUPS_ENAB\fR (boolean)
170 .RS 4
171 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\&.
172 .sp
173 If set to
174 \fIyes\fR,
175 \fBuserdel\fR
176 will remove the user\*(Aqs group if it contains no more members, and
177 \fBuseradd\fR
178 will create by default a group with the name of the user\&.
179 .RE
180 .SH "FILE"
181 .PP
182 /etc/group
183 .RS 4
184 Informazioni sugli account di gruppo\&.
185 .RE
186 .PP
187 /etc/login\&.defs
188 .RS 4
189 Shadow password suite configuration\&.
190 .RE
191 .PP
192 /etc/passwd
193 .RS 4
194 informazioni sugli account utente\&.
195 .RE
196 .PP
197 /etc/shadow
198 .RS 4
199 Informazioni sicure sugli account di utenti\&.
200 .RE
201 .SH "VALORI RESTITUITI"
202 .PP
203 The
204 \fBuserdel\fR
205 command exits with the following values:
206 .PP
207 \fI0\fR
208 .RS 4
209 successo
210 .RE
211 .PP
212 \fI1\fR
213 .RS 4
214 can\*(Aqt update password file
215 .RE
216 .PP
217 \fI2\fR
218 .RS 4
219 sintassi del comando errata
220 .RE
221 .PP
222 \fI6\fR
223 .RS 4
224 il gruppo specificato non esiste
225 .RE
226 .PP
227 \fI8\fR
228 .RS 4
229 user currently logged in
230 .RE
231 .PP
232 \fI10\fR
233 .RS 4
234 non \(`e possibile aggiornare il file group
235 .RE
236 .PP
237 \fI12\fR
238 .RS 4
239 can\*(Aqt remove home directory
240 .RE
241 .SH "AVVISI/CAVEAT"
242 .PP
243
244 \fBuserdel\fR
245 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 \fB\-f\fR
247 option can force the deletion of this account\&.
248 .PP
249 You should manually check all file systems to ensure that no files remain owned by this user\&.
250 .PP
251 Non \(`e possibile rimuovere nessun attributo NIS su un client NIS\&. Questo deve essere fatto sul server NIS\&.
252 .PP
253 If
254 \fBUSERGROUPS_ENAB\fR
255 is defined to
256 \fIyes\fR
257 in
258 /etc/login\&.defs,
259 \fBuserdel\fR
260 will delete the group with the same name as the user\&. To avoid inconsistencies in the passwd and group databases,
261 \fBuserdel\fR
262 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 \fB\-f\fR
264 option can force the deletion of this group\&.
265 .SH "VEDERE ANCHE"
266 .PP
267 \fBchfn\fR(1),
268 \fBchsh\fR(1),
269 \fBpasswd\fR(1),
270 \fBlogin.defs\fR(5),
271 \fBgpasswd\fR(8),
272 \fBgroupadd\fR(8),
273 \fBgroupdel\fR(8),
274 \fBgroupmod\fR(8),
275 \fBuseradd\fR(8),
276 \fBusermod\fR(8)\&.