From: Todd C. Miller Date: Thu, 23 Mar 2000 03:20:57 +0000 (+0000) Subject: Document set_logname option and enbolden refs to sudo and visudo. X-Git-Tag: SUDO_1_6_3~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c8b4fad56354d5e8b81d49c000c57e024fa1223;p=sudo Document set_logname option and enbolden refs to sudo and visudo. --- diff --git a/sudoers.cat b/sudoers.cat index a98a5db2c..60ac83e7c 100644 --- a/sudoers.cat +++ b/sudoers.cat @@ -237,7 +237,7 @@ sudoers(5) FILE FORMATS sudoers(5) modified. This flag is off by default. mail_always Send mail to the _m_a_i_l_t_o user every time a - users runs sudo. This flag is off by default. + users runs ssssuuuuddddoooo. This flag is off by default. mail_no_user If set, mail will be sent to the _m_a_i_l_t_o user @@ -253,7 +253,7 @@ sudoers(5) FILE FORMATS sudoers(5) mail_no_perms If set, mail will be sent to the _m_a_i_l_t_o user - if the invoking user allowed to use sudo but + if the invoking user allowed to use ssssuuuuddddoooo but the command they are trying is not listed in their _s_u_d_o_e_r_s file entry. This flag is off by @@ -289,9 +289,9 @@ sudoers(5) FILE FORMATS sudoers(5) may be overridden via the PASSWD and NOPASSWD tags. This flag is on by default. - root_sudo If set, root is allowed to run sudo too. + root_sudo If set, root is allowed to run ssssuuuuddddoooo too. Disabling this prevents users from "chaining" - sudo commands to get a root shell by doing + ssssuuuuddddoooo commands to get a root shell by doing something like "sudo sudo /bin/sh". This flag is on by default. @@ -347,7 +347,7 @@ sudoers(5) FILE FORMATS sudoers(5) instead of myhost you would use myhost.mydomain.edu. You may still use the short form if you wish (and even mix the two). - Beware that turning on _f_q_d_n requires sudo to + Beware that turning on _f_q_d_n requires ssssuuuuddddoooo to make DNS lookups which may make ssssuuuuddddoooo unusable if DNS stops working (for example if the machine is not plugged into the network). @@ -361,11 +361,11 @@ sudoers(5) FILE FORMATS sudoers(5) you shouldn't need to set _f_q_f_n. This flag is off by default. - insults If set, sudo will insult users when they enter + insults If set, ssssuuuuddddoooo will insult users when they enter an incorrect password. This flag is off by default. - requiretty If set, sudo will only run when the user is + requiretty If set, ssssuuuuddddoooo will only run when the user is logged in to a real tty. This will disallow things like "rsh somehost sudo ls" since _r_s_h(1) does not allocate a tty. Because it is @@ -374,17 +374,17 @@ sudoers(5) FILE FORMATS sudoers(5) flag to prevent a user from entering a visible password. This flag is off by default. - env_editor If set, visudo will use the value of the + env_editor If set, vvvviiiissssuuuuddddoooo will use the value of the EDITOR or VISUAL environment falling back on the default editor. Note that this may create a security hole as most editors allow a user to get a shell (which would be a root shell and not be logged). - rootpw If set, sudo will prompt for the root password + rootpw If set, ssssuuuuddddoooo will prompt for the root password instead of the password of the invoking user. - runaspw If set, sudo will prompt for the password of + runaspw If set, ssssuuuuddddoooo will prompt for the password of the user defined by the _r_u_n_a_s___d_e_f_a_u_l_t option (defaults to root) instead of the password of the invoking user. @@ -400,22 +400,32 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) - targetpw If set, sudo will prompt for the password of + targetpw If set, ssssuuuuddddoooo will prompt for the password of the user specified by the -u flag (defaults to root) instead of the password of the invoking user. + set_logname Normally, ssssuuuuddddoooo will set the LOGNAME and USER + environment variables to the name of the + target user (usually root unless the -u flag + is given). However, since some programs + (including the RCS revision control system) + use LOGNAME to determine the real identity of + the user, it may be desirable to change this + behavior. This can be done by negating the + set_logname option. + use_loginclass - If set, sudo will apply the defaults specified + If set, ssssuuuuddddoooo will apply the defaults specified for the target user's login class if one - exists. Only available if sudo is configured + exists. Only available if ssssuuuuddddoooo is configured with the --with-logincap option. IIIInnnntttteeeeggggeeeerrrrssss: passwd_tries The number of tries a user gets to enter - his/her password before sudo logs the failure + his/her password before ssssuuuuddddoooo logs the failure and exits. The default is 3. IIIInnnntttteeeeggggeeeerrrrssss tttthhhhaaaatttt ccccaaaannnn bbbbeeee uuuusssseeeedddd iiiinnnn aaaa bbbboooooooolllleeeeaaaannnn ccccoooonnnntttteeeexxxxtttt: @@ -434,7 +444,7 @@ sudoers(5) FILE FORMATS sudoers(5) password. passwd_timeout - Number of minutes before the sudo password + Number of minutes before the ssssuuuuddddoooo password prompt times out. The default is 5, set this to 0 for no password timeout. @@ -444,16 +454,6 @@ sudoers(5) FILE FORMATS sudoers(5) SSSSttttrrrriiiinnnnggggssss: - mailsub Subject of the mail sent to the _m_a_i_l_t_o user. - The escape %h will expand to the hostname of - the machine. Default is "*** SECURITY - information for %h ***". - - badpass_message - Message that is displayed if a user enters an - incorrect password. The default is "Sorry, - try again." unless insults are enabled. - @@ -466,6 +466,16 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + mailsub Subject of the mail sent to the _m_a_i_l_t_o user. + The escape %h will expand to the hostname of + the machine. Default is "*** SECURITY + information for %h ***". + + badpass_message + Message that is displayed if a user enters an + incorrect password. The default is "Sorry, + try again." unless insults are enabled. + timestampdir The directory in which ssssuuuuddddoooo stores its timestamp files. The default is _@_T_I_M_E_D_I_R_@. @@ -491,12 +501,12 @@ sudoers(5) FILE FORMATS sudoers(5) Syslog priority to use when user authenticates unsuccessfully. Defaults to "alert". - editor Path to the editor to be used by visudo. The + editor Path to the editor to be used by vvvviiiissssuuuuddddoooo. The default is the path to vi on your system. SSSSttttrrrriiiinnnnggggssss tttthhhhaaaatttt ccccaaaannnn bbbbeeee uuuusssseeeedddd iiiinnnn aaaa bbbboooooooolllleeeeaaaannnn ccccoooonnnntttteeeexxxxtttt: - logfile Path to the sudo log file (not the syslog log + logfile Path to the ssssuuuuddddoooo log file (not the syslog log file). Setting a path turns on logging to a file, negating this option turns it off. @@ -511,16 +521,6 @@ sudoers(5) FILE FORMATS sudoers(5) mailerflags Flags to use when invoking mailer. Defaults to -t. - mailto Address to send warning and erorr mail to. - Defaults to "root". - - exempt_group - Users in this group are exempt from password - and PATH requirements. This is not set by - default. - - - 22/Mar/2000 1.6.3 8 @@ -532,15 +532,23 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + mailto Address to send warning and erorr mail to. + Defaults to "root". + + exempt_group + Users in this group are exempt from password + and PATH requirements. This is not set by + default. + secure_path Path used for every command run from ssssuuuuddddoooo. If - you don't trust the people running sudo to + you don't trust the people running ssssuuuuddddoooo to have a sane PATH environment variable you may want to use this. Another use is if you want to have the "root path" be separate from the "user path." This is not set by default. verifypw This option controls when a password will be - required when a user runs sudo with the ----vvvv. + required when a user runs ssssuuuuddddoooo with the ----vvvv. It has the following possible values: all All the user's I entries for the @@ -561,7 +569,7 @@ sudoers(5) FILE FORMATS sudoers(5) The default value is `all'. listpw This option controls when a password will be - required when a user runs sudo with the ----llll. + required when a user runs ssssuuuuddddoooo with the ----llll. It has the following possible values: all All the user's I entries for the @@ -579,14 +587,6 @@ sudoers(5) FILE FORMATS sudoers(5) always The user must always enter a password to use the B<-l> flag. - The default value is `any'. - - When logging via _s_y_s_l_o_g(3), sudo accepts the following - values for the syslog facility (the value of the ssssyyyysssslllloooogggg - Parameter): aaaauuuutttthhhhpppprrrriiiivvvv (if your OS supports it), aaaauuuutttthhhh, - ddddaaaaeeeemmmmoooonnnn, uuuusssseeeerrrr, llllooooccccaaaallll0000, llllooooccccaaaallll1111, llllooooccccaaaallll2222, llllooooccccaaaallll3333, llllooooccccaaaallll4444, - llllooooccccaaaallll5555, llllooooccccaaaallll6666, and llllooooccccaaaallll7777. The following syslog - 22/Mar/2000 1.6.3 9 @@ -598,6 +598,13 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + The default value is `any'. + + When logging via _s_y_s_l_o_g(3), ssssuuuuddddoooo accepts the following + values for the syslog facility (the value of the ssssyyyysssslllloooogggg + Parameter): aaaauuuutttthhhhpppprrrriiiivvvv (if your OS supports it), aaaauuuutttthhhh, + ddddaaaaeeeemmmmoooonnnn, uuuusssseeeerrrr, llllooooccccaaaallll0000, llllooooccccaaaallll1111, llllooooccccaaaallll2222, llllooooccccaaaallll3333, llllooooccccaaaallll4444, + llllooooccccaaaallll5555, llllooooccccaaaallll6666, and llllooooccccaaaallll7777. The following syslog priorities are supported: aaaalllleeeerrrrtttt, ccccrrrriiiitttt, ddddeeeebbbbuuuugggg, eeeemmmmeeeerrrrgggg, eeeerrrrrrrr, iiiinnnnffffoooo, nnnnoooottttiiiicccceeee, and wwwwaaaarrrrnnnniiiinnnngggg. @@ -645,13 +652,6 @@ sudoers(5) FILE FORMATS sudoers(5) Then user ddddggggbbbb is now allowed to run _/_b_i_n_/_l_s as ooooppppeeeerrrraaaattttoooorrrr, but _/_b_i_n_/_k_i_l_l and _/_u_s_r_/_b_i_n_/_l_p_r_m as rrrrooooooootttt. - NNNNOOOOPPPPAAAASSSSSSSSWWWWDDDD aaaannnndddd PPPPAAAASSSSSSSSWWWWDDDD - - By default, ssssuuuuddddoooo requires that a user authenticate him or - herself before running a command. This behavior can be - modified via the NOPASSWD tag. Like a Runas_Spec, the - NOPASSWD tag sets a default for the commands that follow - it in the Cmnd_Spec_List. Conversely, the PASSWD tag can @@ -664,6 +664,13 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + NNNNOOOOPPPPAAAASSSSSSSSWWWWDDDD aaaannnndddd PPPPAAAASSSSSSSSWWWWDDDD + + By default, ssssuuuuddddoooo requires that a user authenticate him or + herself before running a command. This behavior can be + modified via the NOPASSWD tag. Like a Runas_Spec, the + NOPASSWD tag sets a default for the commands that follow + it in the Cmnd_Spec_List. Conversely, the PASSWD tag can be used to reverse things. For example: ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm @@ -711,13 +718,6 @@ sudoers(5) FILE FORMATS sudoers(5) line arguments, however, as slash ddddooooeeeessss get matched by wildcards. This is to make a path like: - /usr/bin/* - - match /usr/bin/who but not /usr/bin/X11/xterm. - - - - @@ -730,6 +730,10 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + /usr/bin/* + + match /usr/bin/who but not /usr/bin/X11/xterm. + EEEExxxxcccceeeeppppttttiiiioooonnnnssss ttttoooo wwwwiiiillllddddccccaaaarrrrdddd rrrruuuulllleeeessss:::: The following exceptions apply to the above rules: @@ -778,10 +782,6 @@ EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS Below are example _s_u_d_o_e_r_s entries. Admittedly, some of these are a bit contrived. First, we define our _a_l_i_a_s_e_s: - # User alias specification - User_Alias FULLTIMERS = millert, mikef, dowdy - User_Alias PARTTIMERS = bostley, jwfox, crawl - User_Alias WEBMASTERS = will, wendy, wim @@ -796,6 +796,11 @@ EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS sudoers(5) FILE FORMATS sudoers(5) + # User alias specification + User_Alias FULLTIMERS = millert, mikef, dowdy + User_Alias PARTTIMERS = bostley, jwfox, crawl + User_Alias WEBMASTERS = will, wendy, wim + # Runas alias specification Runas_Alias OP = root, operator Runas_Alias DB = oracle, sybase @@ -824,7 +829,7 @@ sudoers(5) FILE FORMATS sudoers(5) Cmnd_Alias SU = /usr/bin/su Here we override some of the compiled in default values. - We want sudo to log via _s_y_s_l_o_g(3) using the _a_u_t_h facility + We want ssssuuuuddddoooo to log via _s_y_s_l_o_g(3) using the _a_u_t_h facility in all cases. We don't want to subject the full time staff to the ssssuuuuddddoooo lecture, and user mmmmiiiilllllllleeeerrrrtttt need not give a password. In addition, on the machines in the _S_E_R_V_E_R_S @@ -845,11 +850,6 @@ sudoers(5) FILE FORMATS sudoers(5) %wheel ALL = (ALL) ALL We let rrrrooooooootttt and any user in group wwwwhhhheeeeeeeellll run any command on - any host as any user. - - FULLTIMERS ALL = NOPASSWD: ALL - - Full time sysadmins (mmmmiiiilllllllleeeerrrrtttt, mmmmiiiikkkkeeeeffff, and ddddoooowwwwddddyyyy) may run @@ -862,6 +862,11 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + any host as any user. + + FULLTIMERS ALL = NOPASSWD: ALL + + Full time sysadmins (mmmmiiiilllllllleeeerrrrtttt, mmmmiiiikkkkeeeeffff, and ddddoooowwwwddddyyyy) may run any command on any host without authenticating themselves. PARTTIMERS ALL = ALL @@ -912,11 +917,6 @@ sudoers(5) FILE FORMATS sudoers(5) jim +biglab = ALL - The user jjjjiiiimmmm may run any command on machines in the _b_i_g_l_a_b - netgroup. SSSSuuuuddddoooo knows that "biglab" is a netgroup due to - the '+' prefix. - - 22/Mar/2000 1.6.3 14 @@ -928,6 +928,10 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + The user jjjjiiiimmmm may run any command on machines in the _b_i_g_l_a_b + netgroup. SSSSuuuuddddoooo knows that "biglab" is a netgroup due to + the '+' prefix. + +secretaries ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser Users in the sssseeeeccccrrrreeeettttaaaarrrriiiieeeessss netgroup need to help manage the @@ -978,10 +982,6 @@ sudoers(5) FILE FORMATS sudoers(5) Any user may mount or unmount a CD-ROM on the machines in the CDROM Host_Alias (orion, perseus, hercules) without entering a password. This is a bit tedious for users to - type, so it is a prime candiate for encapsulating in a - shell script. - - @@ -994,6 +994,9 @@ sudoers(5) FILE FORMATS sudoers(5) sudoers(5) FILE FORMATS sudoers(5) + type, so it is a prime candiate for encapsulating in a + shell script. + SSSSEEEECCCCUUUURRRRIIIITTTTYYYY NNNNOOOOTTTTEEEESSSS It is generally not effective to "subtract" commands from ALL using the '!' operator. A user can trivially @@ -1047,9 +1050,6 @@ SSSSEEEEEEEE AAAALLLLSSSSOOOO - - - 22/Mar/2000 1.6.3 16 diff --git a/sudoers.man.in b/sudoers.man.in index 9697a2caf..214c60482 100644 --- a/sudoers.man.in +++ b/sudoers.man.in @@ -2,12 +2,8 @@ ''' $RCSfile$$Revision$$Date$ ''' ''' $Log$ -''' Revision 1.2 2000/03/23 00:35:59 millert -''' Add FreeBSD login.conf support (untested on BSD/OS) based on a patch from -''' Michael D. Marchionna. -''' configure now does substitution on the man pages, allowing us to -''' fix up the paths and set the section correctly. Based on an idea -''' from Michael D. Marchionna. +''' Revision 1.3 2000/03/23 03:20:57 millert +''' Document set_logname option and enbolden refs to sudo and visudo. ''' ''' .de Sh @@ -388,7 +384,7 @@ some people find it more convenient. This flag is off by default. If set, \fBsudo\fR will ignore \*(L'.\*(R' or \*(L'\*(R' (current dir) in \f(CW$PATH\fR; the \f(CW$PATH\fR itself is not modified. This flag is off by default. .Ip "mail_always" 12 -Send mail to the \fImailto\fR user every time a users runs sudo. +Send mail to the \fImailto\fR user every time a users runs \fBsudo\fR. This flag is off by default. .Ip "mail_no_user" 12 If set, mail will be sent to the \fImailto\fR user if the invoking @@ -399,7 +395,7 @@ user exists in the \fIsudoers\fR file, but is not allowed to run commands on the current host. This flag is off by default. .Ip "mail_no_perms" 12 If set, mail will be sent to the \fImailto\fR user if the invoking -user allowed to use sudo but the command they are trying is not +user allowed to use \fBsudo\fR but the command they are trying is not listed in their \fIsudoers\fR file entry. This flag is off by default. .Ip "tty_tickets" 12 If set, users must authenticate on a per-tty basis. Normally, @@ -416,8 +412,8 @@ means of authentication) before they may run commands. This default may be overridden via the \f(CWPASSWD\fR and \f(CWNOPASSWD\fR tags. This flag is on by default. .Ip "root_sudo" 12 -If set, root is allowed to run sudo too. Disabling this prevents users -from \*(L"chaining\*(R" sudo commands to get a root shell by doing something +If set, root is allowed to run \fBsudo\fR too. Disabling this prevents users +from \*(L"chaining\*(R" \fBsudo\fR commands to get a root shell by doing something like \f(CW"sudo sudo /bin/sh"\fR. This flag is on by default. .Ip "log_host" 12 @@ -449,7 +445,7 @@ be confusing. This flag is off by default. Set this flag if you want to put fully qualified hostnames in the \fIsudoers\fR file. Ie: instead of myhost you would use myhost.mydomain.edu. You may still use the short form if you wish (and even mix the two). -Beware that turning on \fIfqdn\fR requires sudo to make \s-1DNS\s0 lookups +Beware that turning on \fIfqdn\fR requires \fBsudo\fR to make \s-1DNS\s0 lookups which may make \fBsudo\fR unusable if \s-1DNS\s0 stops working (for example if the machine is not plugged into the network). Also note that you must use the host's official name as \s-1DNS\s0 knows it. That is, @@ -459,40 +455,46 @@ issues and the fact that there is no way to get all aliases from command) is already fully qualified you shouldn't need to set \fIfqfn\fR. This flag is off by default. .Ip "insults" 12 -If set, sudo will insult users when they enter an incorrect +If set, \fBsudo\fR will insult users when they enter an incorrect password. This flag is off by default. .Ip "requiretty" 12 -If set, sudo will only run when the user is logged in to a real +If set, \fBsudo\fR will only run when the user is logged in to a real tty. This will disallow things like \f(CW"rsh somehost sudo ls"\fR since \fIrsh\fR\|(1) does not allocate a tty. Because it is not possible to turn of 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 off by default. .Ip "env_editor" 12 -If set, visudo will use the value of the \s-1EDITOR\s0 or \s-1VISUAL\s0 environment +If set, \fBvisudo\fR will use the value of the \s-1EDITOR\s0 or \s-1VISUAL\s0 environment falling back on the default editor. Note that this may create a security hole as most editors allow a user to get a shell (which would be a root shell and not be logged). .Ip "rootpw" 12 -If set, sudo will prompt for the root password instead of the password +If set, \fBsudo\fR will prompt for the root password instead of the password of the invoking user. .Ip "runaspw" 12 -If set, sudo will prompt for the password of the user defined by the +If set, \fBsudo\fR will prompt for the password of the user defined by the \fIrunas_default\fR option (defaults to root) instead of the password of the invoking user. .Ip "targetpw" 12 -If set, sudo will prompt for the password of the user specified by +If set, \fBsudo\fR will prompt for the password of the user specified by the \f(CW-u\fR flag (defaults to root) instead of the password of the invoking user. +.Ip "set_logname" 12 +Normally, \fBsudo\fR will set the \f(CWLOGNAME\fR and \f(CWUSER\fR environment variables +to the name of the target user (usually root unless the \f(CW-u\fR flag is given). +However, since some programs (including the \s-1RCS\s0 revision control system) +use \f(CWLOGNAME\fR to determine the real identity of the user, it may be desirable +to change this behavior. This can be done by negating the set_logname option. .Ip "use_loginclass" 12 -If set, sudo will apply the defaults specified for the target user's -login class if one exists. Only available if sudo is configured with +If set, \fBsudo\fR will apply the defaults specified for the target user's +login class if one exists. Only available if \fBsudo\fR is configured with the --with-logincap option. .PP \fBIntegers\fR: .Ip "passwd_tries" 12 The number of tries a user gets to enter his/her password before -sudo logs the failure and exits. The default is 3. +\fBsudo\fR logs the failure and exits. The default is 3. .PP \fBIntegers that can be used in a boolean context\fR: .Ip "loglinelen" 12 @@ -504,7 +506,7 @@ effect on the syslog log file, only the file log. The default is Number of minutes that can elapse before \fBsudo\fR will ask for a passwd again. The default is 5, set this to 0 to always prompt for a password. .Ip "passwd_timeout" 12 -Number of minutes before the sudo password prompt times out. +Number of minutes before the \fBsudo\fR password prompt times out. The default is 5, set this to 0 for no password timeout. .Ip "umask" 12 Umask to use when running the root command. Set this to 0777 to @@ -536,12 +538,12 @@ Defaults to \*(L"notice\*(R". Syslog priority to use when user authenticates unsuccessfully. Defaults to \*(L"alert\*(R". .Ip "editor" 12 -Path to the editor to be used by visudo. The default is the path +Path to the editor to be used by \fBvisudo\fR. The default is the path to vi on your system. .PP \fBStrings that can be used in a boolean context\fR: .Ip "logfile" 12 -Path to the sudo log file (not the syslog log file). Setting a path +Path to the \fBsudo\fR log file (not the syslog log file). Setting a path turns on logging to a file, negating this option turns it off. .Ip "syslog" 12 Syslog facility if syslog is being used for logging (negate to @@ -558,12 +560,12 @@ Users in this group are exempt from password and \s-1PATH\s0 requirements. This is not set by default. .Ip "secure_path" 12 Path used for every command run from \fBsudo\fR. If you don't trust the -people running sudo to have a sane \f(CWPATH\fR environment variable you may +people running \fBsudo\fR to have a sane \f(CWPATH\fR environment variable you may want to use this. Another use is if you want to have the \*(L"root path\*(R" be separate from the \*(L"user path.\*(R" This is not set by default. .Ip "verifypw" 12 This option controls when a password will be required when a -user runs sudo with the \fB\-v\fR. It has the following possible values: +user runs \fBsudo\fR with the \fB\-v\fR. It has the following possible values: .Sp .Vb 3 \& all All the user's I entries for the @@ -587,7 +589,7 @@ user runs sudo with the \fB\-v\fR. It has the following possible values: The default value is `all\*(R'. .Ip "listpw" 12 This option controls when a password will be required when a -user runs sudo with the \fB\-l\fR. It has the following possible values: +user runs \fBsudo\fR with the \fB\-l\fR. It has the following possible values: .Sp .Vb 3 \& all All the user's I entries for the @@ -610,7 +612,7 @@ user runs sudo with the \fB\-l\fR. It has the following possible values: .Ve The default value is `any\*(R'. .PP -When logging via \fIsyslog\fR\|(3), sudo accepts the following values for the syslog +When logging via \fIsyslog\fR\|(3), \fBsudo\fR accepts the following values for the syslog facility (the value of the \fBsyslog\fR Parameter): \fBauthpriv\fR (if your \s-1OS\s0 supports it), \fBauth\fR, \fBdaemon\fR, \fBuser\fR, \fBlocal0\fR, \fBlocal1\fR, \fBlocal2\fR, \fBlocal3\fR, \fBlocal4\fR, \fBlocal5\fR, \fBlocal6\fR, and \fBlocal7\fR. The following @@ -793,7 +795,7 @@ these are a bit contrived. First, we define our \fIaliases\fR: \& Cmnd_Alias SU = /usr/bin/su .Ve Here we override some of the compiled in default values. We want -sudo to log via \fIsyslog\fR\|(3) using the \fIauth\fR facility in all cases. +\fBsudo\fR to log via \fIsyslog\fR\|(3) using the \fIauth\fR facility in all cases. We don't want to subject the full time staff to the \fBsudo\fR lecture, and user \fBmillert\fR need not give a password. In addition, on the machines in the \fISERVERS\fR \f(CWHost_Alias\fR, we keep an additional @@ -1037,6 +1039,8 @@ as returned by the \f(CWhostname\fR command or use the \fIfqdn\fR option in .IX Item "targetpw" +.IX Item "set_logname" + .IX Item "use_loginclass" .IX Item "passwd_tries" diff --git a/sudoers.pod b/sudoers.pod index c0b0f4b2a..dba8dd56e 100644 --- a/sudoers.pod +++ b/sudoers.pod @@ -235,7 +235,7 @@ the C<$PATH> itself is not modified. This flag is off by default. =item mail_always -Send mail to the I user every time a users runs sudo. +Send mail to the I user every time a users runs B. This flag is off by default. =item mail_no_user @@ -252,7 +252,7 @@ commands on the current host. This flag is off by default. =item mail_no_perms If set, mail will be sent to the I user if the invoking -user allowed to use sudo but the command they are trying is not +user allowed to use B but the command they are trying is not listed in their I file entry. This flag is off by default. =item tty_tickets @@ -277,8 +277,8 @@ This flag is on by default. =item root_sudo -If set, root is allowed to run sudo too. Disabling this prevents users -from "chaining" sudo commands to get a root shell by doing something +If set, root is allowed to run B too. Disabling this prevents users +from "chaining" B commands to get a root shell by doing something like C<"sudo sudo /bin/sh">. This flag is on by default. @@ -322,7 +322,7 @@ be confusing. This flag is off by default. Set this flag if you want to put fully qualified hostnames in the I file. Ie: instead of myhost you would use myhost.mydomain.edu. You may still use the short form if you wish (and even mix the two). -Beware that turning on I requires sudo to make DNS lookups +Beware that turning on I requires B to make DNS lookups which may make B unusable if DNS stops working (for example if the machine is not plugged into the network). Also note that you must use the host's official name as DNS knows it. That is, @@ -334,12 +334,12 @@ I. This flag is off by default. =item insults -If set, sudo will insult users when they enter an incorrect +If set, B will insult users when they enter an incorrect password. This flag is off by default. =item requiretty -If set, sudo will only run when the user is logged in to a real +If set, B 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 of echo when there is no tty present, some sites may with to set @@ -348,32 +348,40 @@ flag is off by default. =item env_editor -If set, visudo will use the value of the EDITOR or VISUAL environment +If set, B will use the value of the EDITOR or VISUAL environment falling back on the default editor. Note that this may create a security hole as most editors allow a user to get a shell (which would be a root shell and not be logged). =item rootpw -If set, sudo will prompt for the root password instead of the password +If set, B will prompt for the root password instead of the password of the invoking user. =item runaspw -If set, sudo will prompt for the password of the user defined by the +If set, B will prompt for the password of the user defined by the I option (defaults to root) instead of the password of the invoking user. =item targetpw -If set, sudo will prompt for the password of the user specified by +If set, B will prompt for the password of the user specified by the C<-u> flag (defaults to root) instead of the password of the invoking user. +=item set_logname + +Normally, B will set the C and C environment variables +to the name of the target user (usually root unless the C<-u> flag is given). +However, since some programs (including the RCS revision control system) +use C to determine the real identity of the user, it may be desirable +to change this behavior. This can be done by negating the set_logname option. + =item use_loginclass -If set, sudo will apply the defaults specified for the target user's -login class if one exists. Only available if sudo is configured with +If set, B will apply the defaults specified for the target user's +login class if one exists. Only available if B is configured with the --with-logincap option. =back @@ -385,7 +393,7 @@ B: =item passwd_tries The number of tries a user gets to enter his/her password before -sudo logs the failure and exits. The default is 3. +B logs the failure and exits. The default is 3. =back @@ -407,7 +415,7 @@ again. The default is 5, set this to 0 to always prompt for a password. =item passwd_timeout -Number of minutes before the sudo password prompt times out. +Number of minutes before the B password prompt times out. The default is 5, set this to 0 for no password timeout. =item umask @@ -461,7 +469,7 @@ Defaults to "alert". =item editor -Path to the editor to be used by visudo. The default is the path +Path to the editor to be used by B. The default is the path to vi on your system. =back 12 @@ -472,7 +480,7 @@ B: =item logfile -Path to the sudo log file (not the syslog log file). Setting a path +Path to the B log file (not the syslog log file). Setting a path turns on logging to a file, negating this option turns it off. =item syslog @@ -501,14 +509,14 @@ This is not set by default. =item secure_path Path used for every command run from B. If you don't trust the -people running sudo to have a sane C environment variable you may +people running B to have a sane C environment variable you may want to use this. Another use is if you want to have the "root path" be separate from the "user path." This is not set by default. =item verifypw This option controls when a password will be required when a -user runs sudo with the B<-v>. It has the following possible values: +user runs B with the B<-v>. It has the following possible values: all All the user's I entries for the current host must have the C @@ -530,7 +538,7 @@ The default value is `all'. =item listpw This option controls when a password will be required when a -user runs sudo with the B<-l>. It has the following possible values: +user runs B with the B<-l>. It has the following possible values: all All the user's I entries for the current host must have the C @@ -551,7 +559,7 @@ The default value is `any'. =back 12 -When logging via syslog(3), sudo accepts the following values for the syslog +When logging via syslog(3), B accepts the following values for the syslog facility (the value of the B Parameter): B (if your OS supports it), B, B, B, B, B, B, B, B, B, B, and B. The following @@ -753,7 +761,7 @@ these are a bit contrived. First, we define our I: Cmnd_Alias SU = /usr/bin/su Here we override some of the compiled in default values. We want -sudo to log via syslog(3) using the I facility in all cases. +B to log via syslog(3) using the I facility in all cases. We don't want to subject the full time staff to the B lecture, and user B need not give a password. In addition, on the machines in the I C, we keep an additional