On Sat, Apr 22, 2006 at 10:55:29AM +0200, Michael Monnerie wrote:
...
> # sudo -H -u vscan sa-learn --dump
...
> But when I do
> # su -l vscan
...
> # sudo -H -u vscan sa-learn --dump
...
> Now why is there a diff between sudo as a user or directly logging in as 

One of the differences will be all the commands in the
User's shell-startup-Files!  Those are ignored, if you
run the command directly by sudo.

It also depends on the version of 'sudo', because one
of the latest changes *dropped* the HOME-Variable
from the environment (at least if you run the command
directly from sudo!).

Lots of our automated cron-scripts suddenly failed
by this 'security fix' and we had to replace
OLD:  sudo command
NEW:  sudo env HOME=$HOME command
to 'bridge the gap' and re-use the *current* HOME
'inside of sudo'.

May be the 'sudo -l vscan' also sets the missing HOME!

Yours    Stucki   (postmaster hit by the same? :-)

Reply via email to