– edit the sudoers file
file in a safe fashion, analogous to
file against multiple simultaneous edits, provides basic sanity checks,
and checks for parse errors.
file is currently being edited you will receive a message to try again later.
There is a hard-coded list of one or more editors that
will use set at compile-time that may be overridden via the
This list defaults to
does not honor the
environment variables unless they contain an editor in the aforementioned
is configured with the
option or the
variable is set in
will use any the editor defines by
Note that this can be a security hole since it allows the user to
execute any program they wish simply by setting
file after the edit and will
not save the changes if there is a syntax error.
Upon finding an error,
will print a message stating the line number(s)
where the error occurred and the user will receive the
At this point the user may enter
to re-edit the
to exit without saving the changes, or
to quit and save changes.
option should be used with extreme care because if
believes there to be a parse error, so will
and no one
will be able to
again until the error is fixed.
is typed to edit the
file after a parse error has been detected, the cursor will be placed on
the line where the error occurred (if the editor supports this feature).
The options are as follows:
file will be
checked for syntax errors, owner and mode.
A message will be printed to the standard output describing the status of
option was specified.
If the check completes successfully,
will exit with a value of 0.
If an error is encountered,
will exit with a value of 1.
With this option
will edit (or check) the
file of your choice,
instead of the default,
The lock file used is the specified
appended to it.
mode only, the argument to
will be read from the standard input.
to print a short help message
to the standard output and exit.
In this mode details about syntax errors are not printed.
This option is only useful when combined with
checking of the
If an alias is used before it is defined,
will consider this a parse error.
Note that it is not possible to differentiate between an
alias and a host name or user name that consists solely of uppercase
letters, digits, and the underscore
to print its version number
The following environment variables may be consulted depending on
the value of the
as the editor to use
is not set
In the latter case, you can ignore the warnings
will not complain
(strict) mode these are errors, not warnings.
(strict) mode this is an error, not a warning.
will ignore cycles when parsing
Many people have worked on
over the years; this version consists of code written primarily by:
Todd C. Miller
See the CONTRIBUTORS file in the
distribution (http://www.sudo.ws/sudo/contributors.html) for an
exhaustive list of people who have contributed to
There is no easy way to prevent a user from gaining a root shell if
the editor used by
If you feel you have found a bug in
please submit a bug report at http://www.sudo.ws/sudo/bugs/
Limited free support is available via the sudo-users mailing list,
see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
search the archives.
and any express or implied warranties, including, but not limited
to, the implied warranties of merchantability and fitness for a
particular purpose are disclaimed.
See the LICENSE file distributed with
or http://www.sudo.ws/sudo/license.html for complete details.