1SUDO(8) BSD System Manager's Manual SUDO(8)
2
4 sudo, sudoedit — execute a command as another user
5
7 sudo -h | -K | -k | -V
8 sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
9 sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
10 [command]
11 sudo [-AbEHnPS] [-C num] [-g group] [-h host] [-p prompt] [-r role]
12 [-t type] [-T timeout] [-u user] [VAR=value] [-i | -s] [command]
13 sudoedit [-AknS] [-C num] [-g group] [-h host] [-p prompt] [-T timeout]
14 [-u user] file ...
15
17 sudo allows a permitted user to execute a command as the superuser or
18 another user, as specified by the security policy. The invoking user's
19 real (not effective) user ID is used to determine the user name with
20 which to query the security policy.
21
22 sudo supports a plugin architecture for security policies and input/out‐
23 put logging. Third parties can develop and distribute their own policy
24 and I/O logging plugins to work seamlessly with the sudo front end. The
25 default security policy is sudoers, which is configured via the file
26 /etc/sudoers, or via LDAP. See the Plugins section for more information.
27
28 The security policy determines what privileges, if any, a user has to run
29 sudo. The policy may require that users authenticate themselves with a
30 password or another authentication mechanism. If authentication is
31 required, sudo will exit if the user's password is not entered within a
32 configurable time limit. This limit is policy-specific; the default
33 password prompt timeout for the sudoers security policy is 5 minutes.
34
35 Security policies may support credential caching to allow the user to run
36 sudo again for a period of time without requiring authentication. The
37 sudoers policy caches credentials for 5 minutes, unless overridden in
38 sudoers(5). By running sudo with the -v option, a user can update the
39 cached credentials without running a command.
40
41 When invoked as sudoedit, the -e option (described below), is implied.
42
43 Security policies may log successful and failed attempts to use sudo. If
44 an I/O plugin is configured, the running command's input and output may
45 be logged as well.
46
47 The options are as follows:
48
49 -A, --askpass
50 Normally, if sudo requires a password, it will read it from
51 the user's terminal. If the -A (askpass) option is speci‐
52 fied, a (possibly graphical) helper program is executed to
53 read the user's password and output the password to the stan‐
54 dard output. If the SUDO_ASKPASS environment variable is
55 set, it specifies the path to the helper program. Otherwise,
56 if sudo.conf(5) contains a line specifying the askpass pro‐
57 gram, that value will be used. For example:
58
59 # Path to askpass helper program
60 Path askpass /usr/X11R6/bin/ssh-askpass
61
62 If no askpass program is available, sudo will exit with an
63 error.
64
65 -b, --background
66 Run the given command in the background. Note that it is not
67 possible to use shell job control to manipulate background
68 processes started by sudo. Most interactive commands will
69 fail to work properly in background mode.
70
71 -C num, --close-from=num
72 Close all file descriptors greater than or equal to num
73 before executing a command. Values less than three are not
74 permitted. By default, sudo will close all open file
75 descriptors other than standard input, standard output and
76 standard error when executing a command. The security policy
77 may restrict the user's ability to use this option. The
78 sudoers policy only permits use of the -C option when the
79 administrator has enabled the closefrom_override option.
80
81 -E, --preserve-env
82 Indicates to the security policy that the user wishes to pre‐
83 serve their existing environment variables. The security
84 policy may return an error if the user does not have permis‐
85 sion to preserve the environment.
86
87 --preserve-env=list
88 Indicates to the security policy that the user wishes to add
89 the comma-separated list of environment variables to those
90 preserved from the user's environment. The security policy
91 may return an error if the user does not have permission to
92 preserve the environment.
93
94 -e, --edit Edit one or more files instead of running a command. In lieu
95 of a path name, the string "sudoedit" is used when consulting
96 the security policy. If the user is authorized by the pol‐
97 icy, the following steps are taken:
98
99 1. Temporary copies are made of the files to be edited with
100 the owner set to the invoking user.
101
102 2. The editor specified by the policy is run to edit the
103 temporary files. The sudoers policy uses the
104 SUDO_EDITOR, VISUAL and EDITOR environment variables (in
105 that order). If none of SUDO_EDITOR, VISUAL or EDITOR
106 are set, the first program listed in the editor
107 sudoers(5) option is used.
108
109 3. If they have been modified, the temporary files are
110 copied back to their original location and the temporary
111 versions are removed.
112
113 To help prevent the editing of unauthorized files, the fol‐
114 lowing restrictions are enforced unless explicitly allowed by
115 the security policy:
116
117 · Symbolic links may not be edited (version 1.8.15 and
118 higher).
119
120 · Symbolic links along the path to be edited are not fol‐
121 lowed when the parent directory is writable by the invok‐
122 ing user unless that user is root (version 1.8.16 and
123 higher).
124
125 · Files located in a directory that is writable by the
126 invoking user may not be edited unless that user is root
127 (version 1.8.16 and higher).
128
129 Users are never allowed to edit device special files.
130
131 If the specified file does not exist, it will be created.
132 Note that unlike most commands run by sudo, the editor is run
133 with the invoking user's environment unmodified. If, for
134 some reason, sudo is unable to update a file with its edited
135 version, the user will receive a warning and the edited copy
136 will remain in a temporary file.
137
138 -g group, --group=group
139 Run the command with the primary group set to group instead
140 of the primary group specified by the target user's password
141 database entry. The group may be either a group name or a
142 numeric group ID (GID) prefixed with the ‘#’ character (e.g.,
143 #0 for GID 0). When running a command as a GID, many shells
144 require that the ‘#’ be escaped with a backslash (‘\’). If
145 no -u option is specified, the command will be run as the
146 invoking user. In either case, the primary group will be set
147 to group. The sudoers policy permits any of the target
148 user's groups to be specified via the -g option as long as
149 the -P option is not in use.
150
151 -H, --set-home
152 Request that the security policy set the HOME environment
153 variable to the home directory specified by the target user's
154 password database entry. Depending on the policy, this may
155 be the default behavior.
156
157 -h, --help Display a short help message to the standard output and exit.
158
159 -h host, --host=host
160 Run the command on the specified host if the security policy
161 plugin supports remote commands. Note that the sudoers plug‐
162 in does not currently support running remote commands. This
163 may also be used in conjunction with the -l option to list a
164 user's privileges for the remote host.
165
166 -i, --login
167 Run the shell specified by the target user's password data‐
168 base entry as a login shell. This means that login-specific
169 resource files such as .profile, .bash_profile or .login will
170 be read by the shell. If a command is specified, it is
171 passed to the shell for execution via the shell's -c option.
172 If no command is specified, an interactive shell is executed.
173 sudo attempts to change to that user's home directory before
174 running the shell. The command is run with an environment
175 similar to the one a user would receive at log in. Note that
176 most shells behave differently when a command is specified as
177 compared to an interactive session; consult the shell's man‐
178 ual for details. The Command environment section in the
179 sudoers(5) manual documents how the -i option affects the
180 environment in which a command is run when the sudoers policy
181 is in use.
182
183 -K, --remove-timestamp
184 Similar to the -k option, except that it removes the user's
185 cached credentials entirely and may not be used in conjunc‐
186 tion with a command or other option. This option does not
187 require a password. Not all security policies support cre‐
188 dential caching.
189
190 -k, --reset-timestamp
191 When used without a command, invalidates the user's cached
192 credentials. In other words, the next time sudo is run a
193 password will be required. This option does not require a
194 password and was added to allow a user to revoke sudo permis‐
195 sions from a .logout file.
196
197 When used in conjunction with a command or an option that may
198 require a password, this option will cause sudo to ignore the
199 user's cached credentials. As a result, sudo will prompt for
200 a password (if one is required by the security policy) and
201 will not update the user's cached credentials.
202
203 Not all security policies support credential caching.
204
205 -l, --list If no command is specified, list the allowed (and forbidden)
206 commands for the invoking user (or the user specified by the
207 -U option) on the current host. A longer list format is used
208 if this option is specified multiple times and the security
209 policy supports a verbose output format.
210
211 If a command is specified and is permitted by the security
212 policy, the fully-qualified path to the command is displayed
213 along with any command line arguments. If a command is spec‐
214 ified but not allowed by the policy, sudo will exit with a
215 status value of 1.
216
217 -n, --non-interactive
218 Avoid prompting the user for input of any kind. If a pass‐
219 word is required for the command to run, sudo will display an
220 error message and exit.
221
222 -P, --preserve-groups
223 Preserve the invoking user's group vector unaltered. By
224 default, the sudoers policy will initialize the group vector
225 to the list of groups the target user is a member of. The
226 real and effective group IDs, however, are still set to match
227 the target user.
228
229 -p prompt, --prompt=prompt
230 Use a custom password prompt with optional escape sequences.
231 The following percent (‘%’) escape sequences are supported by
232 the sudoers policy:
233
234 %H expanded to the host name including the domain name (on
235 if the machine's host name is fully qualified or the fqdn
236 option is set in sudoers(5))
237
238 %h expanded to the local host name without the domain name
239
240 %p expanded to the name of the user whose password is being
241 requested (respects the rootpw, targetpw, and runaspw
242 flags in sudoers(5))
243
244 %U expanded to the login name of the user the command will
245 be run as (defaults to root unless the -u option is also
246 specified)
247
248 %u expanded to the invoking user's login name
249
250 %% two consecutive ‘%’ characters are collapsed into a sin‐
251 gle ‘%’ character
252
253 The custom prompt will override the default prompt specified
254 by either the security policy or the SUDO_PROMPT environment
255 variable. On systems that use PAM, the custom prompt will
256 also override the prompt specified by a PAM module unless the
257 passprompt_override flag is disabled in sudoers.
258
259 -r role, --role=role
260 Run the command with an SELinux security context that
261 includes the specified role.
262
263 -S, --stdin
264 Write the prompt to the standard error and read the password
265 from the standard input instead of using the terminal device.
266
267 -s, --shell
268 Run the shell specified by the SHELL environment variable if
269 it is set or the shell specified by the invoking user's pass‐
270 word database entry. If a command is specified, it is passed
271 to the shell for execution via the shell's -c option. If no
272 command is specified, an interactive shell is executed. Note
273 that most shells behave differently when a command is speci‐
274 fied as compared to an interactive session; consult the
275 shell's manual for details.
276
277 -t type, --type=type
278 Run the command with an SELinux security context that
279 includes the specified type. If no type is specified, the
280 default type is derived from the role.
281
282 -U user, --other-user=user
283 Used in conjunction with the -l option to list the privileges
284 for user instead of for the invoking user. The security pol‐
285 icy may restrict listing other users' privileges. The
286 sudoers policy only allows root or a user with the ALL privi‐
287 lege on the current host to use this option.
288
289 -T timeout, --command-timeout=timeout
290 Used to set a timeout for the command. If the timeout
291 expires before the command has exited, the command will be
292 terminated. The security policy may restrict the ability to
293 set command timeouts. The sudoers policy requires that user-
294 specified timeouts be explicitly enabled.
295
296 -u user, --user=user
297 Run the command as a user other than the default target user
298 (usually root). The user may be either a user name or a
299 numeric user ID (UID) prefixed with the ‘#’ character (e.g.,
300 #0 for UID 0). When running commands as a UID, many shells
301 require that the ‘#’ be escaped with a backslash (‘\’). Some
302 security policies may restrict UIDs to those listed in the
303 password database. The sudoers policy allows UIDs that are
304 not in the password database as long as the targetpw option
305 is not set. Other security policies may not support this.
306
307 -V, --version
308 Print the sudo version string as well as the version string
309 of the security policy plugin and any I/O plugins. If the
310 invoking user is already root the -V option will display the
311 arguments passed to configure when sudo was built and plugins
312 may display more verbose information such as default options.
313
314 -v, --validate
315 Update the user's cached credentials, authenticating the user
316 if necessary. For the sudoers plugin, this extends the sudo
317 timeout for another 5 minutes by default, but does not run a
318 command. Not all security policies support cached creden‐
319 tials.
320
321 -- The -- option indicates that sudo should stop processing com‐
322 mand line arguments.
323
324 Environment variables to be set for the command may also be passed on the
325 command line in the form of VAR=value, e.g.,
326 LD_LIBRARY_PATH=/usr/local/pkg/lib. Variables passed on the command line
327 are subject to restrictions imposed by the security policy plugin. The
328 sudoers policy subjects variables passed on the command line to the same
329 restrictions as normal environment variables with one important excep‐
330 tion. If the setenv option is set in sudoers, the command to be run has
331 the SETENV tag set or the command matched is ALL, the user may set vari‐
332 ables that would otherwise be forbidden. See sudoers(5) for more infor‐
333 mation.
334
336 When sudo executes a command, the security policy specifies the execution
337 environment for the command. Typically, the real and effective user and
338 group and IDs are set to match those of the target user, as specified in
339 the password database, and the group vector is initialized based on the
340 group database (unless the -P option was specified).
341
342 The following parameters may be specified by security policy:
343
344 · real and effective user ID
345
346 · real and effective group ID
347
348 · supplementary group IDs
349
350 · the environment list
351
352 · current working directory
353
354 · file creation mode mask (umask)
355
356 · SELinux role and type
357
358 · scheduling priority (aka nice value)
359
360 Process model
361 There are two distinct ways sudo can run a command.
362
363 If an I/O logging plugin is configured or if the security policy explic‐
364 itly requests it, a new pseudo-terminal (“pty”) is allocated and fork(2)
365 is used to create a second sudo process, referred to as the monitor. The
366 monitor creates a new terminal session with itself as the leader and the
367 pty as its controlling terminal, calls fork(2), sets up the execution
368 environment as described above, and then uses the execve(2) system call
369 to run the command in the child process. The monitor exists to relay job
370 control signals between the user's existing terminal and the pty the com‐
371 mand is being run in. This makes it possible to suspend and resume the
372 command. Without the monitor, the command would be in what POSIX terms
373 an “orphaned process group” and it would not receive any job control sig‐
374 nals from the kernel. When the command exits or is terminated by a sig‐
375 nal, the monitor passes the command's exit status to the main sudo
376 process and exits. After receiving the command's exit status, the main
377 sudo passes the command's exit status to the security policy's close
378 function and exits.
379
380 If no pty is used, sudo calls fork(2), sets up the execution environment
381 as described above, and uses the execve(2) system call to run the command
382 in the child process. The main sudo process waits until the command has
383 completed, then passes the command's exit status to the security policy's
384 close function and exits. As a special case, if the policy plugin does
385 not define a close function, sudo will execute the command directly
386 instead of calling fork(2) first. The sudoers policy plugin will only
387 define a close function when I/O logging is enabled, a pty is required,
388 or the pam_session or pam_setcred options are enabled. Note that
389 pam_session and pam_setcred are enabled by default on systems using PAM.
390
391 Signal handling
392 When the command is run as a child of the sudo process, sudo will relay
393 signals it receives to the command. The SIGINT and SIGQUIT signals are
394 only relayed when the command is being run in a new pty or when the sig‐
395 nal was sent by a user process, not the kernel. This prevents the com‐
396 mand from receiving SIGINT twice each time the user enters control-C.
397 Some signals, such as SIGSTOP and SIGKILL, cannot be caught and thus will
398 not be relayed to the command. As a general rule, SIGTSTP should be used
399 instead of SIGSTOP when you wish to suspend a command being run by sudo.
400
401 As a special case, sudo will not relay signals that were sent by the com‐
402 mand it is running. This prevents the command from accidentally killing
403 itself. On some systems, the reboot(8) command sends SIGTERM to all non-
404 system processes other than itself before rebooting the system. This
405 prevents sudo from relaying the SIGTERM signal it received back to
406 reboot(8), which might then exit before the system was actually rebooted,
407 leaving it in a half-dead state similar to single user mode. Note, how‐
408 ever, that this check only applies to the command run by sudo and not any
409 other processes that the command may create. As a result, running a
410 script that calls reboot(8) or shutdown(8) via sudo may cause the system
411 to end up in this undefined state unless the reboot(8) or shutdown(8) are
412 run using the exec() family of functions instead of system() (which
413 interposes a shell between the command and the calling process).
414
415 If no I/O logging plugins are loaded and the policy plugin has not
416 defined a close() function, set a command timeout or required that the
417 command be run in a new pty, sudo may execute the command directly
418 instead of running it as a child process.
419
420 Plugins
421 Plugins may be specified via Plugin directives in the sudo.conf(5) file.
422 They may be loaded as dynamic shared objects (on systems that support
423 them), or compiled directly into the sudo binary. If no sudo.conf(5)
424 file is present, or it contains no Plugin lines, sudo will use the tradi‐
425 tional sudoers security policy and I/O logging. See the sudo.conf(5)
426 manual for details of the /etc/sudo.conf file and the sudo_plugin(5) man‐
427 ual for more information about the sudo plugin architecture.
428
430 Upon successful execution of a command, the exit status from sudo will be
431 the exit status of the program that was executed. If the command termi‐
432 nated due to receipt of a signal, sudo will send itself the same signal
433 that terminated the command.
434
435 If the -l option was specified without a command, sudo will exit with a
436 value of 0 if the user is allowed to run sudo and they authenticated suc‐
437 cessfully (as required by the security policy). If a command is speci‐
438 fied with the -l option, the exit value will only be 0 if the command is
439 permitted by the security policy, otherwise it will be 1.
440
441 If there is an authentication failure, a configuration/permission problem
442 or if the given command cannot be executed, sudo exits with a value of 1.
443 In the latter case, the error string is printed to the standard error.
444 If sudo cannot stat(2) one or more entries in the user's PATH, an error
445 is printed to the standard error. (If the directory does not exist or if
446 it is not really a directory, the entry is ignored and no error is
447 printed.) This should not happen under normal circumstances. The most
448 common reason for stat(2) to return “permission denied” is if you are
449 running an automounter and one of the directories in your PATH is on a
450 machine that is currently unreachable.
451
453 sudo tries to be safe when executing external commands.
454
455 To prevent command spoofing, sudo checks "." and "" (both denoting cur‐
456 rent directory) last when searching for a command in the user's PATH (if
457 one or both are in the PATH). Note, however, that the actual PATH envi‐
458 ronment variable is not modified and is passed unchanged to the program
459 that sudo executes.
460
461 Users should never be granted sudo privileges to execute files that are
462 writable by the user or that reside in a directory that is writable by
463 the user. If the user can modify or replace the command there is no way
464 to limit what additional commands they can run.
465
466 Please note that sudo will normally only log the command it explicitly
467 runs. If a user runs a command such as sudo su or sudo sh, subsequent
468 commands run from that shell are not subject to sudo's security policy.
469 The same is true for commands that offer shell escapes (including most
470 editors). If I/O logging is enabled, subsequent commands will have their
471 input and/or output logged, but there will not be traditional logs for
472 those commands. Because of this, care must be taken when giving users
473 access to commands via sudo to verify that the command does not inadver‐
474 tently give the user an effective root shell. For more information,
475 please see the Preventing shell escapes section in sudoers(5).
476
477 To prevent the disclosure of potentially sensitive information, sudo dis‐
478 ables core dumps by default while it is executing (they are re-enabled
479 for the command that is run). This historical practice dates from a time
480 when most operating systems allowed setuid processes to dump core by
481 default. To aid in debugging sudo crashes, you may wish to re-enable
482 core dumps by setting “disable_coredump” to false in the sudo.conf(5)
483 file as follows:
484
485 Set disable_coredump false
486
487 See the sudo.conf(5) manual for more information.
488
490 sudo utilizes the following environment variables. The security policy
491 has control over the actual content of the command's environment.
492
493 EDITOR Default editor to use in -e (sudoedit) mode if neither
494 SUDO_EDITOR nor VISUAL is set.
495
496 MAIL Set to the mail spool of the target user when the -i
497 option is specified or when env_reset is enabled in
498 sudoers (unless MAIL is present in the env_keep list).
499
500 HOME Set to the home directory of the target user when the -i
501 or -H options are specified, when the -s option is spec‐
502 ified and set_home is set in sudoers, when
503 always_set_home is enabled in sudoers, or when env_reset
504 is enabled in sudoers and HOME is not present in the
505 env_keep list.
506
507 LOGNAME Set to the login name of the target user when the -i
508 option is specified, when the set_logname option is
509 enabled in sudoers or when the env_reset option is
510 enabled in sudoers (unless LOGNAME is present in the
511 env_keep list).
512
513 PATH May be overridden by the security policy.
514
515 SHELL Used to determine shell to run with -s option.
516
517 SUDO_ASKPASS Specifies the path to a helper program used to read the
518 password if no terminal is available or if the -A option
519 is specified.
520
521 SUDO_COMMAND Set to the command run by sudo.
522
523 SUDO_EDITOR Default editor to use in -e (sudoedit) mode.
524
525 SUDO_GID Set to the group ID of the user who invoked sudo.
526
527 SUDO_PROMPT Used as the default password prompt unless the -p option
528 was specified.
529
530 SUDO_PS1 If set, PS1 will be set to its value for the program
531 being run.
532
533 SUDO_UID Set to the user ID of the user who invoked sudo.
534
535 SUDO_USER Set to the login name of the user who invoked sudo.
536
537 USER Set to the same value as LOGNAME, described above.
538
539 VISUAL Default editor to use in -e (sudoedit) mode if
540 SUDO_EDITOR is not set.
541
543 /etc/sudo.conf sudo front end configuration
544
546 Note: the following examples assume a properly configured security pol‐
547 icy.
548
549 To get a file listing of an unreadable directory:
550
551 $ sudo ls /usr/local/protected
552
553 To list the home directory of user yaz on a machine where the file system
554 holding ~yaz is not exported as root:
555
556 $ sudo -u yaz ls ~yaz
557
558 To edit the index.html file as user www:
559
560 $ sudoedit -u www ~www/htdocs/index.html
561
562 To view system logs only accessible to root and users in the adm group:
563
564 $ sudo -g adm more /var/log/syslog
565
566 To run an editor as jim with a different primary group:
567
568 $ sudoedit -u jim -g audio ~jim/sound.txt
569
570 To shut down a machine:
571
572 $ sudo shutdown -r +15 "quick reboot"
573
574 To make a usage listing of the directories in the /home partition. Note
575 that this runs the commands in a sub-shell to make the cd and file redi‐
576 rection work.
577
578 $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
579
581 Error messages produced by sudo include:
582
583 editing files in a writable directory is not permitted
584 By default, sudoedit does not permit editing a file when any of the
585 parent directories are writable by the invoking user. This avoids
586 a race condition that could allow the user to overwrite an arbi‐
587 trary file. See the sudoedit_checkdir option in sudoers(5) for
588 more information.
589
590 editing symbolic links is not permitted
591 By default, sudoedit does not follow symbolic links when opening
592 files. See the sudoedit_follow option in sudoers(5) for more
593 information.
594
595 effective uid is not 0, is sudo installed setuid root?
596 sudo was not run with root privileges. The sudo binary must be
597 owned by the root user and have the Set-user-ID bit set. Also, it
598 must not be located on a file system mounted with the ‘nosuid’
599 option or on an NFS file system that maps uid 0 to an unprivileged
600 uid.
601
602 effective uid is not 0, is sudo on a file system with the 'nosuid' option
603 set or an NFS file system without root privileges?
604 sudo was not run with root privileges. The sudo binary has the
605 proper owner and permissions but it still did not run with root
606 privileges. The most common reason for this is that the file sys‐
607 tem the sudo binary is located on is mounted with the ‘nosuid’
608 option or it is an NFS file system that maps uid 0 to an unprivi‐
609 leged uid.
610
611 fatal error, unable to load plugins
612 An error occurred while loading or initializing the plugins speci‐
613 fied in sudo.conf(5).
614
615 invalid environment variable name
616 One or more environment variable names specified via the -E option
617 contained an equal sign (‘=’). The arguments to the -E option
618 should be environment variable names without an associated value.
619
620 no password was provided
621 When sudo tried to read the password, it did not receive any char‐
622 acters. This may happen if no terminal is available (or the -S
623 option is specified) and the standard input has been redirected
624 from /dev/null.
625
626 no tty present and no askpass program specified
627 sudo needs to read the password but there is no mechanism available
628 to do so. A terminal is not present to read the password from,
629 sudo has not been configured to read from the standard input, and
630 no askpass program has been specified either via the -A option or
631 the SUDO_ASKPASS environment variable.
632
633 no writable temporary directory found
634 sudoedit was unable to find a usable temporary directory in which
635 to store its intermediate files.
636
637 sudo must be owned by uid 0 and have the setuid bit set
638 sudo was not run with root privileges. The sudo binary does not
639 have the correct owner or permissions. It must be owned by the
640 root user and have the Set-user-ID bit set.
641
642 sudoedit is not supported on this platform
643 It is only possible to run sudoedit on systems that support setting
644 the effective user-ID.
645
646 timed out reading password
647 The user did not enter a password before the password timeout (5
648 minutes by default) expired.
649
650 you do not exist in the passwd database
651 Your user ID does not appear in the system passwd database.
652
653 you may not specify environment variables in edit mode
654 It is only possible to specify environment variables when running a
655 command. When editing a file, the editor is run with the user's
656 environment unmodified.
657
659 su(1), stat(2), login_cap(3), passwd(5), sudo.conf(5), sudo_plugin(5),
660 sudoers(5), sudoreplay(8), visudo(8)
661
663 See the HISTORY file in the sudo distribution (https://www.sudo.ws/his‐
664 tory.html) for a brief history of sudo.
665
667 Many people have worked on sudo over the years; this version consists of
668 code written primarily by:
669
670 Todd C. Miller
671
672 See the CONTRIBUTORS file in the sudo distribution
673 (https://www.sudo.ws/contributors.html) for an exhaustive list of people
674 who have contributed to sudo.
675
677 There is no easy way to prevent a user from gaining a root shell if that
678 user is allowed to run arbitrary commands via sudo. Also, many programs
679 (such as editors) allow the user to run commands via shell escapes, thus
680 avoiding sudo's checks. However, on most systems it is possible to pre‐
681 vent shell escapes with the sudoers(5) plugin's noexec functionality.
682
683 It is not meaningful to run the cd command directly via sudo, e.g.,
684
685 $ sudo cd /usr/local/protected
686
687 since when the command exits the parent process (your shell) will still
688 be the same. Please see the EXAMPLES section for more information.
689
690 Running shell scripts via sudo can expose the same kernel bugs that make
691 setuid shell scripts unsafe on some operating systems (if your OS has a
692 /dev/fd/ directory, setuid shell scripts are generally safe).
693
695 If you feel you have found a bug in sudo, please submit a bug report at
696 https://bugzilla.sudo.ws/
697
699 Limited free support is available via the sudo-users mailing list, see
700 https://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search
701 the archives.
702
704 sudo is provided “AS IS” and any express or implied warranties, includ‐
705 ing, but not limited to, the implied warranties of merchantability and
706 fitness for a particular purpose are disclaimed. See the LICENSE file
707 distributed with sudo or https://www.sudo.ws/license.html for complete
708 details.
709
710Sudo 1.8.27 November 25, 2018 Sudo 1.8.27