The B<-H> (I<HOME>) option sets the C<HOME> environment variable
to the homedir of the target user (root by default) as specified
-in passwd(5). By default, B<sudo> does not modify C<HOME>.
+in passwd(@mansectform@). By default, B<sudo> does not modify C<HOME>.
=item -K
=item -i
-The C<-i> (I<simulate initial login>) option runs the shell specified
-in the passwd(@mansectform@) entry of the user that the command is
+The B<-i> (I<simulate initial login>) option runs the shell specified
+in the L<passwd(@mansectform@)> entry of the user that the command is
being run as. The command name argument given to the shell begins
with a C<-> to tell the shell to run as a login shell. B<sudo>
attempts to change to that user's home directory before running the
The B<-s> (I<shell>) option runs the shell specified by the I<SHELL>
environment variable if it is set or the shell as specified
-in passwd(5).
+in L<passwd(@mansectform@)>.
=item -u
Otherwise, B<sudo> quits with an exit value of 1 if there is a
configuration/permission problem or if B<sudo> cannot execute the
given command. In the latter case the error string is printed to
-stderr. If B<sudo> cannot stat(2) one or more entries in the user's
+stderr. If B<sudo> cannot L<stat(2)> one or more entries in the user's
C<PATH> an error is printed on stderr. (If the directory does not
exist or if it is not really a directory, the entry is ignored and
no error is printed.) This should not happen under normal
-circumstances. The most common reason for stat(2) to return
+circumstances. The most common reason for L<stat(2)> to return
"permission denied" is if you are running an automounter and one
of the directories in your C<PATH> is on a machine that is currently
unreachable.
B<sudo> will check the ownership of its timestamp directory
(F<@timedir@> by default) and ignore the directory's contents if
it is not owned by root and only writable by root. On systems that
-allow non-root users to give away files via chown(2), if the timestamp
+allow non-root users to give away files via L<chown(2)>, if the timestamp
directory is located in a directory writable by anyone (e.g.: F</tmp>),
it is possible for a user to create the timestamp directory before
B<sudo> is run. However, because B<sudo> checks the ownership and
=head1 EXAMPLES
-Note: the following examples assume suitable sudoers(5) entries.
+Note: the following examples assume suitable L<sudoers(@mansectform@)> entries.
To get a file listing of an unreadable directory:
is specified)
VISUAL Default editor to use in -e (sudoedit) mode
+
=head1 FILES
@sysconfdir@/sudoers List of who can run what
Also, many programs (such as editors) allow the user to run commands
via shell escapes, thus avoiding B<sudo>'s checks. However, on
most systems it is possible to prevent shell escapes with B<sudo>'s
-I<noexec> functionality. See the sudoers(5) manual for details.
+I<noexec> functionality. See the L<sudoers(@mansectform@)> manual for details.
If users have sudo C<ALL> there is nothing to prevent them from creating
their own program that gives them a root shell regardless of any '!'
=head1 SEE ALSO
-grep(1), su(1), stat(2), login_cap(3), sudoers(5), passwd(5), visudo(8)
+L<grep(1)>, L<su(1)>, L<stat(2)>, L<login_cap(3)>, L<sudoers(@mansectform@)>,
+L<passwd(@mansectform@)>, L<visudo(@mansectsu@)>
If set, B<sudo> will only run when the user is logged in to a real
tty. This will disallow things like C<"rsh somehost sudo ls"> since
-rsh(1) does not allocate a tty. Because it is not possible to turn
+L<rsh(1)> does not allocate a tty. Because it is not possible to turn
off echo when there is no tty present, some sites may with to set
this flag to prevent a user from entering a visible password. This
flag is I<off> by default.
=back
-When logging via syslog(3), B<sudo> accepts the following values for the syslog
-facility (the value of the B<syslog> Parameter): B<authpriv> (if your OS
-supports it), B<auth>, B<daemon>, B<user>, B<local0>, B<local1>, B<local2>,
-B<local3>, B<local4>, B<local5>, B<local6>, and B<local7>. The following
-syslog priorities are supported: B<alert>, B<crit>, B<debug>, B<emerg>,
-B<err>, B<info>, B<notice>, and B<warning>.
+When logging via L<syslog(3)>, B<sudo> accepts the following values
+for the syslog facility (the value of the B<syslog> Parameter):
+B<authpriv> (if your OS supports it), B<auth>, B<daemon>, B<user>,
+B<local0>, B<local1>, B<local2>, B<local3>, B<local4>, B<local5>,
+B<local6>, and B<local7>. The following syslog priorities are
+supported: B<alert>, B<crit>, B<debug>, B<emerg>, B<err>, B<info>,
+B<notice>, and B<warning>.
=head2 User Specification
B<sudo> allows shell-style I<wildcards> to be used in pathnames
as well as command line arguments in the I<sudoers> file. Wildcard
-matching is done via the B<POSIX> C<fnmatch(3)> routine. Note that
+matching is done via the B<POSIX> L<fnmatch(3)> routine. Note that
these are I<not> regular expressions.
=over 8
Cmnd_Alias SU = /usr/bin/su
Here we override some of the compiled in default values. We want
-B<sudo> to log via syslog(3) using the I<auth> facility in all
+B<sudo> to log via L<syslog(3)> using the I<auth> facility in all
cases. We don't want to subject the full time staff to the B<sudo>
lecture, user B<millert> need not give a password, and we don't
want to set the C<LOGNAME> or C<USER> environment variables when
joe ALL = /usr/bin/su operator
-The user B<joe> may only su(1) to operator.
+The user B<joe> may only L<su(1)> to operator.
pete HPPA = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root
The user B<pete> is allowed to change anyone's password except for
-root on the I<HPPA> machines. Note that this assumes passwd(1)
+root on the I<HPPA> machines. Note that this assumes L<passwd(1)>
does not take multiple usernames on the command line.
bob SPARC = (OP) ALL : SGI = (OP) ALL
john ALPHA = /usr/bin/su [!-]*, !/usr/bin/su *root*
On the I<ALPHA> machines, user B<john> may su to anyone except root
-but he is not allowed to give su(1) any flags.
+but he is not allowed to give L<su(1)> any flags.
jen ALL, !SERVERS = ALL
On the host www, any user in the I<WEBMASTERS> C<User_Alias> (will,
wendy, and wim), may run any command as user www (which owns the
-web pages) or simply su(1) to www.
+web pages) or simply L<su(1)> to www.
ALL CDROM = NOPASSWD: /sbin/umount /CDROM,\
/sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM
=head1 SEE ALSO
-rsh(1), su(1), fnmatch(3), sudo(8), visudo(8)
+L<rsh(1)>, L<su(1)>, L<fnmatch(3)>, L<sudo(@mansectsu@)>, L<visudo(@mansectsu@)>
=head1 DESCRIPTION
B<visudo> edits the I<sudoers> file in a safe fashion, analogous to
-vipw(8). B<visudo> locks the I<sudoers> file against multiple
+L<vipw(@mansectsu@)>. B<visudo> locks the I<sudoers> file against multiple
simultaneous edits, provides basic sanity checks, and checks
for parse errors. If the I<sudoers> file is currently being
edited you will receive a message to try again later.
There is a hard-coded list of editors that B<visudo> will use set
at compile-time that may be overridden via the I<editor> I<sudoers>
-C<Default> variable. This list defaults to the path to vi(1) on
+C<Default> variable. This list defaults to the path to L<vi(1)> on
your system, as determined by the I<configure> script. Normally,
B<visudo> does not honor the C<VISUAL> or C<EDITOR> environment
variables unless they contain an editor in the aforementioned editors
=head1 SEE ALSO
-vi(1), sudoers(5), sudo(8), vipw(8)
+L<vi(1)>, L<sudoers(@mansectform@)>, L<sudo(@mansectsu@)>, L<vipw(@mansectsu@)>