summaryrefslogtreecommitdiff
path: root/man/it/man8/usermod.8
blob: 4703cb968c1a2e2b5f9c4657927df91078e0a5d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
'\" t
.\"     Title: usermod
.\"    Author: Julianne Frances Haugh
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 22/07/2021
.\"    Manual: Comandi per la gestione del sistema
.\"    Source: shadow-utils 4.9
.\"  Language: Italian
.\"
.TH "USERMOD" "8" "22/07/2021" "shadow\-utils 4\&.9" "Comandi per la gestione del si"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NOME"
usermod \- modifica l\*(Aqaccount di un utente
.SH "SINOSSI"
.HP \w'\fBusermod\fR\ 'u
\fBusermod\fR [\fIopzioni\fR] \fILOGIN\fR
.SH "DESCRIZIONE"
.PP
The
\fBusermod\fR
command modifies the system account files to reflect the changes that are specified on the command line\&.
.SH "OPZIONI"
.PP
The options which apply to the
\fBusermod\fR
command are:
.PP
\fB\-a\fR, \fB\-\-append\fR
.RS 4
Add the user to the supplementary group(s)\&. Use only with the
\fB\-G\fR
option\&.
.RE
.PP
\fB\-b\fR, \fB\-\-badnames\fR
.RS 4
Allow names that do not conform to standards\&.
.RE
.PP
\fB\-c\fR, \fB\-\-comment\fR\ \&\fICOMMENT\fR
.RS 4
The new value of the user\*(Aqs password file comment field\&. It is normally modified using the
\fBchfn\fR(1)
utility\&.
.RE
.PP
\fB\-d\fR, \fB\-\-home\fR\ \&\fIHOME_DIR\fR
.RS 4
La nuova directory home dell\*(Aqutente\&.
.sp
If the
\fB\-m\fR
option is given, the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist\&. If the current home directory does not exist the new home directory will not be created\&.
.RE
.PP
\fB\-e\fR, \fB\-\-expiredate\fR\ \&\fIEXPIRE_DATE\fR
.RS 4
The date on which the user account will be disabled\&. The date is specified in the format
\fIYYYY\-MM\-DD\fR\&.
.sp
An empty
\fIEXPIRE_DATE\fR
argument will disable the expiration of the account\&.
.sp
This option requires a
/etc/shadow
file\&. A
/etc/shadow
entry will be created if there were none\&.
.RE
.PP
\fB\-f\fR, \fB\-\-inactive\fR\ \&\fIINACTIVE\fR
.RS 4
Il numero di giorni dopo la scadenza di una password prima che l\*(Aqaccount venga disabilitato permanentemente\&.
.sp
Il valore 0 disabilita l\*(Aqaccount non appena la password \(`e scaduta, e il valore \-1 disabilita questa funzionalit\(`a\&.
.sp
This option requires a
/etc/shadow
file\&. A
/etc/shadow
entry will be created if there were none\&.
.RE
.PP
\fB\-g\fR, \fB\-\-gid\fR\ \&\fIGROUP\fR
.RS 4
Il nome o numero del gruppo da assegnare alla connessione dell\*(Aqutente\&. Il gruppo deve esistere\&.
.sp
Tutti i file nella directory home dell\*(Aqutente che hanno come gruppo il precedente gruppo primario dell\*(Aqutente stesso verranno modificati perch\('e abbiano questo nuovo gruppo\&.
.sp
Il gruppo dei file che si trovano all\*(Aqesterno della directory home dell\*(Aqutente andr\(`a modificato manualmente\&.
.sp
The change of the group ownership of files inside of the user\*(Aqs home directory is also not done if the home dir owner uid is different from the current or new user id\&. This is a safety measure for special home directories such as
/\&.
.RE
.PP
\fB\-G\fR, \fB\-\-groups\fR\ \&\fIGROUP1\fR[\fI,GROUP2,\&.\&.\&.\fR[\fI,GROUPN\fR]]]
.RS 4
A list of supplementary groups which the user is also a member of\&. Each group is separated from the next by a comma, with no intervening whitespace\&. The groups are subject to the same restrictions as the group given with the
\fB\-g\fR
option\&.
.sp
If the user is currently a member of a group which is not listed, the user will be removed from the group\&. This behaviour can be changed via the
\fB\-a\fR
option, which appends the user to the current supplementary group list\&.
.RE
.PP
\fB\-l\fR, \fB\-\-login\fR\ \&\fINEW_LOGIN\fR
.RS 4
The name of the user will be changed from
\fILOGIN\fR
to
\fINEW_LOGIN\fR\&. Nothing else is changed\&. In particular, the user\*(Aqs home directory or mail spool should probably be renamed manually to reflect the new login name\&.
.RE
.PP
\fB\-L\fR, \fB\-\-lock\fR
.RS 4
Lock a user\*(Aqs password\&. This puts a \*(Aq!\*(Aq in front of the encrypted password, effectively disabling the password\&. You can\*(Aqt use this option with
\fB\-p\fR
or
\fB\-U\fR\&.
.sp
Note: if you wish to lock the account (not only access with a password), you should also set the
\fIEXPIRE_DATE\fR
to
\fI1\fR\&.
.RE
.PP
\fB\-m\fR, \fB\-\-move\-home\fR
.RS 4
Move the content of the user\*(Aqs home directory to the new location\&. If the current home directory does not exist the new home directory will not be created\&.
.sp
This option is only valid in combination with the
\fB\-d\fR
(or
\fB\-\-home\fR) option\&.
.sp
\fBusermod\fR
will try to adapt the ownership of the files and to copy the modes, ACL and extended attributes, but manual changes might be needed afterwards\&.
.RE
.PP
\fB\-o\fR, \fB\-\-non\-unique\fR
.RS 4
When used with the
\fB\-u\fR
option, this option allows to change the user ID to a non\-unique value\&.
.RE
.PP
\fB\-p\fR, \fB\-\-password\fR\ \&\fIPASSWORD\fR
.RS 4
The encrypted password, as returned by
\fBcrypt\fR(3)\&.
.sp
\fBNote:\fR
This option is not recommended because the password (or encrypted password) will be visible by users listing the processes\&.
.sp
Ci si deve accertare che la password rispetti le norme delle password del sistema\&.
.RE
.PP
\fB\-R\fR, \fB\-\-root\fR\ \&\fICHROOT_DIR\fR
.RS 4
Apply changes in the
\fICHROOT_DIR\fR
directory and use the configuration files from the
\fICHROOT_DIR\fR
directory\&.
.RE
.PP
\fB\-P\fR, \fB\-\-prefix\fR\ \&\fIPREFIX_DIR\fR
.RS 4
Apply changes in the
\fIPREFIX_DIR\fR
directory and use the configuration files from the
\fIPREFIX_DIR\fR
directory\&. This option does not chroot and is intended for preparing a cross\-compilation target\&. Some limitations: NIS and LDAP users/groups are not verified\&. PAM authentication is using the host files\&. No SELINUX support\&.
.RE
.PP
\fB\-s\fR, \fB\-\-shell\fR\ \&\fISHELL\fR
.RS 4
The path of the user\*(Aqs new login shell\&. Setting this field to blank causes the system to select the default login shell\&.
.RE
.PP
\fB\-u\fR, \fB\-\-uid\fR\ \&\fIUID\fR
.RS 4
Il nuovo valore numerico dell\*(AqID utente\&.
.sp
This value must be unique, unless the
\fB\-o\fR
option is used\&. The value must be non\-negative\&.
.sp
La casella di posta dell\*(Aqutente e ogni altro file di propriet\(`a dell\*(Aqutente che si trovi all\*(Aqinterno della directory home avr\(`a l\*(AqID utente cambiato automaticamente\&.
.sp
La propriet\(`a dei file esterni alla directory home dell\*(Aqutente va corretta manualmente\&.
.sp
The change of the user ownership of files inside of the user\*(Aqs home directory is also not done if the home dir owner uid is different from the current or new user id\&. This is a safety measure for special home directories such as
/\&.
.sp
No checks will be performed with regard to the
\fBUID_MIN\fR,
\fBUID_MAX\fR,
\fBSYS_UID_MIN\fR, or
\fBSYS_UID_MAX\fR
from
/etc/login\&.defs\&.
.RE
.PP
\fB\-U\fR, \fB\-\-unlock\fR
.RS 4
Unlock a user\*(Aqs password\&. This removes the \*(Aq!\*(Aq in front of the encrypted password\&. You can\*(Aqt use this option with
\fB\-p\fR
or
\fB\-L\fR\&.
.sp
Note: if you wish to unlock the account (not only access with a password), you should also set the
\fIEXPIRE_DATE\fR
(for example to
\fI99999\fR, or to the
\fBEXPIRE\fR
value from
/etc/default/useradd)\&.
.RE
.PP
\fB\-v\fR, \fB\-\-add\-subuids\fR\ \&\fIFIRST\fR\-\fILAST\fR
.RS 4
Add a range of subordinate uids to the user\*(Aqs account\&.
.sp
This option may be specified multiple times to add multiple ranges to a users account\&.
.sp
No checks will be performed with regard to
\fBSUB_UID_MIN\fR,
\fBSUB_UID_MAX\fR, or
\fBSUB_UID_COUNT\fR
from /etc/login\&.defs\&.
.RE
.PP
\fB\-V\fR, \fB\-\-del\-subuids\fR\ \&\fIFIRST\fR\-\fILAST\fR
.RS 4
Remove a range of subordinate uids from the user\*(Aqs account\&.
.sp
This option may be specified multiple times to remove multiple ranges to a users account\&. When both
\fB\-\-del\-subuids\fR
and
\fB\-\-add\-subuids\fR
are specified, the removal of all subordinate uid ranges happens before any subordinate uid range is added\&.
.sp
No checks will be performed with regard to
\fBSUB_UID_MIN\fR,
\fBSUB_UID_MAX\fR, or
\fBSUB_UID_COUNT\fR
from /etc/login\&.defs\&.
.RE
.PP
\fB\-w\fR, \fB\-\-add\-subgids\fR\ \&\fIFIRST\fR\-\fILAST\fR
.RS 4
Add a range of subordinate gids to the user\*(Aqs account\&.
.sp
This option may be specified multiple times to add multiple ranges to a users account\&.
.sp
No checks will be performed with regard to
\fBSUB_GID_MIN\fR,
\fBSUB_GID_MAX\fR, or
\fBSUB_GID_COUNT\fR
from /etc/login\&.defs\&.
.RE
.PP
\fB\-W\fR, \fB\-\-del\-subgids\fR\ \&\fIFIRST\fR\-\fILAST\fR
.RS 4
Remove a range of subordinate gids from the user\*(Aqs account\&.
.sp
This option may be specified multiple times to remove multiple ranges to a users account\&. When both
\fB\-\-del\-subgids\fR
and
\fB\-\-add\-subgids\fR
are specified, the removal of all subordinate gid ranges happens before any subordinate gid range is added\&.
.sp
No checks will be performed with regard to
\fBSUB_GID_MIN\fR,
\fBSUB_GID_MAX\fR, or
\fBSUB_GID_COUNT\fR
from /etc/login\&.defs\&.
.RE
.PP
\fB\-Z\fR, \fB\-\-selinux\-user\fR\ \&\fISEUSER\fR
.RS 4
Il nuovo utente SELinux per il login dell\*(Aqutente\&.
.sp
A blank
\fISEUSER\fR
will remove the SELinux user mapping for user
\fILOGIN\fR
(if any)\&.
.RE
.SH "AVVISI/CAVEAT"
.PP
You must make certain that the named user is not executing any processes when this command is being executed if the user\*(Aqs numerical user ID, the user\*(Aqs name, or the user\*(Aqs home directory is being changed\&.
\fBusermod\fR
checks this on Linux\&. On other platforms it only uses utmp to check if the user is logged in\&.
.PP
You must change the owner of any
\fBcrontab\fR
files or
\fBat\fR
jobs manually\&.
.PP
Si devono apportare tutte le modifiche che riguardano NIS sul server NIS\&.
.SH "CONFIGURAZIONE"
.PP
The following configuration variables in
/etc/login\&.defs
change the behavior of this tool:
.PP
\fBLASTLOG_UID_MAX\fR (number)
.RS 4
Highest user ID number for which the lastlog entries should be updated\&. As higher user IDs are usually tracked by remote user identity and authentication services there is no need to create a huge sparse lastlog file for them\&.
.sp
No
\fBLASTLOG_UID_MAX\fR
option present in the configuration means that there is no user ID limit for writing lastlog entries\&.
.RE
.PP
\fBMAIL_DIR\fR (string)
.RS 4
La directory di spool per la posta\&. Questa \(`e necessaria per manipolare la casella di posta quando il corrispondente account utente viene modificato o cancellato\&. Se non \(`e specificata viene utilizzato un valore impostato al momento della compilazione\&.
.RE
.PP
\fBMAIL_FILE\fR (string)
.RS 4
Imposta la posizione delle caselle di posta degli utenti relative alla loro directory home\&.
.RE
.PP
The
\fBMAIL_DIR\fR
and
\fBMAIL_FILE\fR
variables are used by
\fBuseradd\fR,
\fBusermod\fR, and
\fBuserdel\fR
to create, move, or delete the user\*(Aqs mail spool\&.
.PP
If
\fBMAIL_CHECK_ENAB\fR
is set to
\fIyes\fR, they are also used to define the
\fBMAIL\fR
environment variable\&.
.PP
\fBMAX_MEMBERS_PER_GROUP\fR (number)
.RS 4
Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
/etc/group
(with the same name, same password, and same GID)\&.
.sp
Il valore predefinito \(`e 0, che non pone nessun limite al numero di membri per gruppo\&.
.sp
Questa opzione (dividi gruppo) permette di limitare la lunghezza delle righe nel file \(Fogroup\(Fc\&. Questo \(`e utile per essere certi che le righe per gruppi NIS non eccedano i 1024 caratteri\&.
.sp
Se si deve impostare questo limite, si pu\(`o usare 25\&.
.sp
Nota: la divisione dei gruppi potrebbe non essere supportata da ogni strumento (anche all\*(Aqinterno del pacchetto Shadow)\&. Non si dovrebbe utilizzare questa variabile a meno di esserci forzati\&.
.RE
.PP
\fBSUB_GID_MIN\fR (number), \fBSUB_GID_MAX\fR (number), \fBSUB_GID_COUNT\fR (number)
.RS 4
If
/etc/subuid
exists, the commands
\fBuseradd\fR
and
\fBnewusers\fR
(unless the user already have subordinate group IDs) allocate
\fBSUB_GID_COUNT\fR
unused group IDs from the range
\fBSUB_GID_MIN\fR
to
\fBSUB_GID_MAX\fR
for each new user\&.
.sp
The default values for
\fBSUB_GID_MIN\fR,
\fBSUB_GID_MAX\fR,
\fBSUB_GID_COUNT\fR
are respectively 100000, 600100000 and 65536\&.
.RE
.PP
\fBSUB_UID_MIN\fR (number), \fBSUB_UID_MAX\fR (number), \fBSUB_UID_COUNT\fR (number)
.RS 4
If
/etc/subuid
exists, the commands
\fBuseradd\fR
and
\fBnewusers\fR
(unless the user already have subordinate user IDs) allocate
\fBSUB_UID_COUNT\fR
unused user IDs from the range
\fBSUB_UID_MIN\fR
to
\fBSUB_UID_MAX\fR
for each new user\&.
.sp
The default values for
\fBSUB_UID_MIN\fR,
\fBSUB_UID_MAX\fR,
\fBSUB_UID_COUNT\fR
are respectively 100000, 600100000 and 65536\&.
.RE
.SH "FILE"
.PP
/etc/group
.RS 4
Informazioni sugli account di gruppo\&.
.RE
.PP
/etc/gshadow
.RS 4
Informazioni sicure sugli account di gruppo\&.
.RE
.PP
/etc/login\&.defs
.RS 4
Configurazione del pacchetto password shadow
.RE
.PP
/etc/passwd
.RS 4
Informazioni sugli account utente\&.
.RE
.PP
/etc/shadow
.RS 4
Informazioni sicure sugli account utente\&.
.RE
.PP
/etc/subgid
.RS 4
Per user subordinate group IDs\&.
.RE
.PP
/etc/subuid
.RS 4
Per user subordinate user IDs\&.
.RE
.SH "VEDERE ANCHE"
.PP
\fBchfn\fR(1),
\fBchsh\fR(1),
\fBpasswd\fR(1),
\fBcrypt\fR(3),
\fBgpasswd\fR(8),
\fBgroupadd\fR(8),
\fBgroupdel\fR(8),
\fBgroupmod\fR(8),
\fBlogin.defs\fR(5),
\fBsubgid\fR(5), \fBsubuid\fR(5),
\fBuseradd\fR(8),
\fBuserdel\fR(8)\&.