sudo problems. anyone feeling up to it?

Steven W. Orr steveo at syslang.net
Mon Jul 21 14:07:08 EDT 2008


We have a bunch of old debian sarge distros running and we're slowly 
upgrading to Ubuntu Feisty Fawn.

For reasons that are not important here, we need to run our python app as 
root. So we added

ALL     ALL = NOPASSWD: /usr/bin/python

to the sudoers file. (Yeah yeah don't start.)

The problem is that under the FF release, sudo is acting broken, i.e., not 
like the man page sez it's supposed to. Under FF, I lose my HOME envvar. 
I'm not supposed to lose it.

503 > sudo python
Python 2.5.1 (r251:54863, Mar  7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system('bash')
root at vma-sorr:/home/sorr# echo $HOME

root at vma-sorr:/home/sorr#

Also, I have one more piece of info: As root, I say

sudo -V

and I get this partial output

Environment variables to check for sanity:
         XAUTHORIZATION
         XAUTHORITY
         DISPLAY
         LOGNAME
         HOME
         TERM
         LANGUAGE
         LANG
         LC_*
Environment variables to remove:
         PERL5OPT
         PERL5LIB
         PERLLIB
         JAVA_TOOL_OPTIONS
         SHELLOPTS
         PS4
         BASH_ENV
         ENV
         TERMCAP
         TERMPATH
         TERMINFO_DIRS
         TERMINFO
         _RLD*
         LD_*
         PATH_LOCALE
         NLSPATH
         HOSTALIASES
         RES_OPTIONS
         LOCALDOMAIN
         PS4
         SHELLOPTS
         CDPATH
         IFS

So it *says* that it checks HOME for sanity and it *says* that HOME is not 
in the list of variables to remove.

But under any other machine I have access to, I do not lose HOME. I 
suppose it could be a bug, but I doubt it. Does anyone have any 
suggestions?

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net


More information about the gnhlug-discuss mailing list