Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / it / su.1
1 '\" t
2 .\"     Title: su
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: User Commands
7 .\"    Source: User Commands
8 .\"  Language: Italian
9 .\"
10 .TH "SU" "1" "16/02/2011" "User Commands" "User 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 su \- change user ID or become superuser
32 .SH "SINOSSI"
33 .HP \w'\fBsu\fR\ 'u
34 \fBsu\fR [\fIopzioni\fR] [\fIusername\fR]
35 .SH "DESCRIZIONE"
36 .PP
37 The
38 \fBsu\fR
39 command is used to become another user during a login session\&. Invoked without a
40 \fBusername\fR,
41 \fBsu\fR
42 defaults to becoming the superuser\&. The optional argument
43 \fB\-\fR
44 may be used to provide an environment similar to what the user would expect had the user logged in directly\&.
45 .PP
46 Dopo il nome utente, \(`e possibile specificare argomenti aggiuntivi da passare alla shell di login dell\*(Aqutente\&. In particolare, molti interpreti di comando adottano la convenzione per cui l\*(Aqopzione
47 \fB\-c\fR
48 seguita da un argomento fa s\(`i che quest\*(Aqultimo sia considerato un comando\&.Il comando viene eseguito dalla shell specificata in
49 /etc/passwd
50 per l\*(Aqutente di destinazione\&.
51 .PP
52 You can use the
53 \fB\-\-\fR
54 argument to separate
55 \fBsu\fR
56 options from the arguments supplied to the shell\&.
57 .PP
58 All\*(Aqutente viene quindi chiesta la password, se necessario\&. Una password errata viene segnalata da un messaggio d\*(Aqerrore\&. Viene effettuato il log di tutti i tentativi, siano essi riusciti o meno, al fine di rilevare ogni abuso del sistema\&.
59 .PP
60 The current environment is passed to the new shell\&. The value of
61 \fB$PATH\fR
62 is reset to
63 /bin:/usr/bin
64 for normal users, or
65 /sbin:/bin:/usr/sbin:/usr/bin
66 for the superuser\&. This may be changed with the
67 \fBENV_PATH\fR
68 and
69 \fBENV_SUPATH\fR
70 definitions in
71 /etc/login\&.defs\&.
72 .PP
73 A subsystem login is indicated by the presence of a "*" as the first character of the login shell\&. The given home directory will be used as the root of a new file system which the user is actually logged into\&.
74 .SH "OPZIONI"
75 .PP
76 Il comando
77 \fBsu\fR
78 accetta le seguenti opzioni:
79 .PP
80 \fB\-c\fR, \fB\-\-command\fR \fICOMMAND\fR
81 .RS 4
82 Specify a command that will be invoked by the shell using its
83 \fB\-c\fR\&.
84 .RE
85 .PP
86 \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR
87 .RS 4
88 Provide an environment similar to what the user would expect had the user logged in directly\&.
89 .sp
90 When
91 \fB\-\fR
92 is used, it must be specified as the last
93 \fBsu\fR
94 option\&. The other forms (\fB\-l\fR
95 and
96 \fB\-\-login\fR) do not have this restriction\&.
97 .RE
98 .PP
99 \fB\-s\fR, \fB\-\-shell\fR \fISHELL\fR
100 .RS 4
101 The shell that will be invoked\&.
102 .sp
103 The invoked shell is chosen from (highest priority first):
104 .PP
105 .RS 4
106 The shell specified with \-\-shell\&.
107 .RE
108 .PP
109 .RS 4
110 If
111 \fB\-\-preserve\-environment\fR
112 is used, the shell specified by the
113 \fB$SHELL\fR
114 environment variable\&.
115 .RE
116 .PP
117 .RS 4
118 The shell indicated in the
119 /etc/passwd
120 entry for the target user\&.
121 .RE
122 .PP
123 .RS 4
124 /bin/sh
125 if a shell could not be found by any above method\&.
126 .RE
127 .sp
128 If the target user has a restricted shell (i\&.e\&. the shell field of this user\*(Aqs entry in
129 /etc/passwd
130 is not listed in
131 /etc/shell), then the
132 \fB\-\-shell\fR
133 option or the
134 \fB$SHELL\fR
135 environment variable won\*(Aqt be taken into account, unless
136 \fBsu\fR
137 is called by root\&.
138 .RE
139 .PP
140 \fB\-m\fR, \fB\-p\fR, \fB\-\-preserve\-environment\fR
141 .RS 4
142 Preserve the current environment, except for:
143 .PP
144 \fB$PATH\fR
145 .RS 4
146 reset according to the
147 /etc/login\&.defs
148 options
149 \fBENV_PATH\fR
150 or
151 \fBENV_SUPATH\fR
152 (see below);
153 .RE
154 .PP
155 \fB$IFS\fR
156 .RS 4
157 reset to
158 \(Fo<space><tab><newline>\(Fc, if it was set\&.
159 .RE
160 .sp
161 If the target user has a restricted shell, this option has no effect (unless
162 \fBsu\fR
163 is called by root)\&.
164 .sp
165 Note that the default behavior for the environment is the following:
166 .PP
167 .RS 4
168 The
169 \fB$HOME\fR,
170 \fB$SHELL\fR,
171 \fB$USER\fR,
172 \fB$LOGNAME\fR,
173 \fB$PATH\fR, and
174 \fB$IFS\fR
175 environment variables are reset\&.
176 .RE
177 .PP
178 .RS 4
179 If
180 \fB\-\-login\fR
181 is not used, the environment is copied, except for the variables above\&.
182 .RE
183 .PP
184 .RS 4
185 If
186 \fB\-\-login\fR
187 is used, the
188 \fB$TERM\fR,
189 \fB$COLORTERM\fR,
190 \fB$DISPLAY\fR, and
191 \fB$XAUTHORITY\fR
192 environment variables are copied if they were set\&.
193 .RE
194 .PP
195 .RS 4
196 If
197 \fB\-\-login\fR
198 is used, the
199 \fB$TZ\fR,
200 \fB$HZ\fR, and
201 \fB$MAIL\fR
202 environment variables are set according to the
203 /etc/login\&.defs
204 options
205 \fBENV_TZ\fR,
206 \fBENV_HZ\fR,
207 \fBMAIL_DIR\fR, and
208 \fBMAIL_FILE\fR
209 (see below)\&.
210 .RE
211 .PP
212 .RS 4
213 If
214 \fB\-\-login\fR
215 is used, other environment variables might be set by the
216 \fBENVIRON_FILE\fR
217 file (see below)\&.
218 .RE
219 .sp
220 .RE
221 .SH "AVVISI/CAVEAT"
222 .PP
223 Questa versione di
224 \fBsu\fR
225 ha molte opzioni di compilazione; solo una parte di esse potrebbe essere in uso su un determinato sistema\&.
226 .SH "CONFIGURATION"
227 .PP
228 The following configuration variables in
229 /etc/login\&.defs
230 change the behavior of this tool:
231 .PP
232 \fBCONSOLE\fR (string)
233 .RS 4
234 If defined, either full pathname of a file containing device names (one per line) or a ":" delimited list of device names\&. Root logins will be allowed only upon these devices\&.
235 .sp
236 If not defined, root will be allowed on any device\&.
237 .sp
238 The device should be specified without the /dev/ prefix\&.
239 .RE
240 .PP
241 \fBCONSOLE_GROUPS\fR (string)
242 .RS 4
243 List of groups to add to the user\*(Aqs supplementary groups set when logging in on the console (as determined by the CONSOLE setting)\&. Default is none\&.
244
245 Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
246 .RE
247 .PP
248 \fBDEFAULT_HOME\fR (boolean)
249 .RS 4
250 Indicate if login is allowed if we can\*(Aqt cd to the home directory\&. Default in no\&.
251 .sp
252 If set to
253 \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&.
254 .RE
255 .PP
256 \fBENV_HZ\fR (string)
257 .RS 4
258 If set, it will be used to define the HZ environment variable when a user login\&. The value must be preceded by
259 \fIHZ=\fR\&. A common value on Linux is
260 \fIHZ=100\fR\&.
261 .RE
262 .PP
263 \fBENVIRON_FILE\fR (string)
264 .RS 4
265 If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
266 .sp
267 Lines starting with a # are treated as comment lines and ignored\&.
268 .RE
269 .PP
270 \fBENV_PATH\fR (string)
271 .RS 4
272 If set, it will be used to define the PATH environment variable when a regular user login\&. The value can be preceded by
273 \fIPATH=\fR, or a colon separated list of paths (for example
274 \fI/bin:/usr/bin\fR)\&. The default value is
275 \fIPATH=/bin:/usr/bin\fR\&.
276 .RE
277 .PP
278 \fBENV_SUPATH\fR (string)
279 .RS 4
280 If set, it will be used to define the PATH environment variable when the superuser login\&. The value can be preceded by
281 \fIPATH=\fR, or a colon separated list of paths (for example
282 \fI/sbin:/bin:/usr/sbin:/usr/bin\fR)\&. The default value is
283 \fIPATH=/bin:/usr/bin\fR\&.
284 .RE
285 .PP
286 \fBENV_TZ\fR (string)
287 .RS 4
288 If set, it will be used to define the TZ environment variable when a user login\&. The value can be the name of a timezone preceded by
289 \fITZ=\fR
290 (for example
291 \fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
292 /etc/tzname)\&.
293 .sp
294 If a full path is specified but the file does not exist or cannot be read, the default is to use
295 \fITZ=CST6CDT\fR\&.
296 .RE
297 .PP
298 \fBLOGIN_STRING\fR (string)
299 .RS 4
300 The string used for prompting a password\&. The default is to use "Password: ", or a translation of that string\&. If you set this variable, the prompt will no be translated\&.
301 .sp
302 If the string contains
303 \fI%s\fR, this will be replaced by the user\*(Aqs name\&.
304 .RE
305 .PP
306 \fBMAIL_CHECK_ENAB\fR (boolean)
307 .RS 4
308 Enable checking and display of mailbox status upon login\&.
309 .sp
310 You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
311 .RE
312 .PP
313 \fBMAIL_DIR\fR (string)
314 .RS 4
315 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\&.
316 .RE
317 .PP
318 \fBMAIL_FILE\fR (string)
319 .RS 4
320 Defines the location of the users mail spool files relatively to their home directory\&.
321 .RE
322 .PP
323 The
324 \fBMAIL_DIR\fR
325 and
326 \fBMAIL_FILE\fR
327 variables are used by
328 \fBuseradd\fR,
329 \fBusermod\fR, and
330 \fBuserdel\fR
331 to create, move, or delete the user\*(Aqs mail spool\&.
332 .PP
333 If
334 \fBMAIL_CHECK_ENAB\fR
335 is set to
336 \fIyes\fR, they are also used to define the
337 \fBMAIL\fR
338 environment variable\&.
339 .PP
340 \fBQUOTAS_ENAB\fR (boolean)
341 .RS 4
342 Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
343 .RE
344 .PP
345 \fBSULOG_FILE\fR (string)
346 .RS 4
347 If defined, all su activity is logged to this file\&.
348 .RE
349 .PP
350 \fBSU_NAME\fR (string)
351 .RS 4
352 If defined, the command name to display when running "su \-"\&. For example, if this is defined as "su" then a "ps" will display the command is "\-su"\&. If not defined, then "ps" would display the name of the shell actually being run, e\&.g\&. something like "\-sh"\&.
353 .RE
354 .PP
355 \fBSU_WHEEL_ONLY\fR (boolean)
356 .RS 4
357 If
358 \fIyes\fR, the user must be listed as a member of the first gid 0 group in
359 /etc/group
360 (called
361 \fIroot\fR
362 on most Linux systems) to be able to
363 \fBsu\fR
364 to uid 0 accounts\&. If the group doesn\*(Aqt exist or is empty, no one will be able to
365 \fBsu\fR
366 to uid 0\&.
367 .RE
368 .PP
369 \fBSYSLOG_SU_ENAB\fR (boolean)
370 .RS 4
371 Enable "syslog" logging of
372 \fBsu\fR
373 activity \- in addition to sulog file logging\&.
374 .RE
375 .PP
376 \fBUSERGROUPS_ENAB\fR (boolean)
377 .RS 4
378 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\&.
379 .sp
380 If set to
381 \fIyes\fR,
382 \fBuserdel\fR
383 will remove the user\*(Aqs group if it contains no more members, and
384 \fBuseradd\fR
385 will create by default a group with the name of the user\&.
386 .RE
387 .SH "FILE"
388 .PP
389 /etc/passwd
390 .RS 4
391 informazioni sugli account utente\&.
392 .RE
393 .PP
394 /etc/shadow
395 .RS 4
396 Informazioni sicure sugli account di utenti\&.
397 .RE
398 .PP
399 /etc/login\&.defs
400 .RS 4
401 Shadow password suite configuration\&.
402 .RE
403 .SH "VEDERE ANCHE"
404 .PP
405 \fBlogin\fR(1),
406 \fBlogin.defs\fR(5),
407 \fBsg\fR(1),
408 \fBsh\fR(1)\&.