sudo problems. anyone feeling up to it?
John Abreau
jabr at blu.org
Mon Jul 21 14:46:01 EDT 2008
As a sanity check, I'd verify whether it's being removed by sudo
or by python:
ALL ALL = NOPASSWD: /bin/bash
sudo bash
echo $HOME
After verifying which was responsible, the next thing I'd wonder
is whether SELinux is doing something unexpected.
On Mon, July 21, 2008 2:07 pm, Steven W. Orr said:
> 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
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
--
John Abreau / Executive Director, Boston Linux & Unix
IM: jabr at jabber.blu.org / abreauj at AIM / abreauj at Yahoo / zusa_it_mgr at Skype
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the gnhlug-discuss
mailing list