From: Todd C. Miller Date: Sat, 15 Dec 2001 02:17:14 +0000 (+0000) Subject: Many people believe that adding a runas spec should obviate the need X-Git-Tag: SUDO_1_6_4~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4450b82c8773b75d6e040f6613a0977f587a11b0;p=sudo Many people believe that adding a runas spec should obviate the need for the -u flag. It does not. --- diff --git a/TROUBLESHOOTING b/TROUBLESHOOTING index 00d1ffa7f..d39d8b47e 100644 --- a/TROUBLESHOOTING +++ b/TROUBLESHOOTING @@ -82,7 +82,7 @@ A) Sudo removes the following "dangerous" environment variables TERMINFO TERMINFO_DIRS TERMPATH - TERMCAP (if it begins with a '/') + TERMCAP ENV BASH_ENV LC_ (if it contains a '/' or '%') @@ -152,5 +152,17 @@ A) Some SVR4-derived OS's include a /usr/bin/cd command for reasons unfathomable. A "cd" command is totally useless since a child process cannot affect the current working directory of the parent (your shell). +Q) When I run sudo it says I am not alllowed to run the command as root + but I don't want to run it as root, I want to run it as another user. + My sudoers file entry looks like: + bob ALL=(oracle) ALL +A) The default user sudo tries to run things as is always root, even if + the invoking user can only run commands as a single, specific user. + This may change in the future but at the present time you have to + work around this using the 'runas_default' option in sudoers. + For example: + Defaults:bob runas_default=oracle + would achieve the desired result ofr the preceding sudoers fragment. + Q) How do you pronounce `sudo'? A) soo-doo (for superuser do).