[sudo-users] sudo can't find an executable in my $PATH!
repsons at gmail.com
Sat Nov 1 12:43:16 EDT 2008
On Saturday 01 November 2008 16:29:48 Chris O'Regan wrote:
> > Simply I have script "doit" in /opt/scripts and I want to execute it as
> > roon by typing "sudo doit". /opt/scripts is in $PATH both of root and my
> > user. It doesn't works! Thing this simple has nearly turned out in a
> > nightmare just in trying to make it work and looking for what is wrong :(
> > Please answer.
> Can you send the output of "sudo doit" as well as "sudo -l"? Also, what
> are the file permissions of "doit"?
Oh, good to see, someone saw this. I was doing more "research" on the problem and it is in the fact, that $PATH variable gets modified by sudo! I set sudoers to preserve PATH, but no good.
env and "sudo env" gives me different things! Why is that?
More information about the sudo-users