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