]> granicus.if.org Git - sudo/commitdiff
Many people believe that adding a runas spec should obviate the need
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Dec 2001 02:17:14 +0000 (02:17 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Dec 2001 02:17:14 +0000 (02:17 +0000)
for the -u flag.  It does not.

TROUBLESHOOTING

index 00d1ffa7f290d1aa3f24dd8d02f6fd45f177a649..d39d8b47eb7eb0be507b02059bb5a4d5a5e0387d 100644 (file)
@@ -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).