Blog

Fedora 8 and the Sudo command

Today I was checking out the latest mono from subversion and something funny was happening, I wasn’t able to install the builds if I used sudo make install, the error I was getting was a bit different from package to package but always looked something like:

/usr/local/bin/gacutil /i monodoc.dll /f /package monodoc /gacdir /usr/local/lib /root /usr/local/lib
xdg-open: unexpected option ‘-q’
Try ‘xdg-open –help’ for more information.
Failure adding assembly monodoc.dll to the cache: Attempt to install an assembly without a strong name.

The first thing that came to my mind was that the assembly wasn’t strong named, which I discarded after trying a simple make install without sudo and as a normal user. Then, I found that if I did a su and then the make install it worked just fine, but if still as root I did sudo make install it all failed…

Turns out that Fedora 8 sudo package uses some new flags to improve security, something previous versions didn’t had enabled because I don’t remember to ever have this sort of problems. To solve this I needed to edit /etc/sudoers and comment the lines that said Defaults env_reset and Defaults env_keep.

What those 2 flags do is to destroy the environment variables when a new “sudoed” session is created, some of them seem to be avoiding some commands from working correctly… anyway, its just one more little configuration to remember to do when I install fedora.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Leave a Reply

For spam filtering purposes, please copy the number 6182 to the field below: