[gentoo-user] Re: sudo not setting the path (was sudo not running a shell as a login shell)

2003-03-31 Thread William Hubbs
Hi Rick and all, The problem appears to be that for some reason, sudo doesn't put the /usr/sbin and /sbin directories in the path. That means that if I do the following: sudo [command] where command is in /sbin or /usr/sbin, I get a message that says sudo: [command] not found I am using

Re: [gentoo-user] Re: sudo not setting the path (was sudo not running a shell as a login shell)

2003-03-31 Thread Ric Messier
sudo wasn't designed to do that. your original post indicated that you wanted sudo to execute a shell, which is what su does. your problem is that you are attempting to execute something that isn't in your path. since you aren't actually running the command as root (ie, there is no login context),

Re: [gentoo-user] Re: sudo not setting the path (was sudo not running a shell as a login shell)

2003-03-31 Thread James H. Cloos Jr.
The problem appears to be that for some reason, sudo doesn't put the /usr/sbin and /sbin directories in the path. | sudo wasn't designed to do that. That is not generally true. I have at least two boxen (with distribution-provided sudo installs) where sudo does result in a PATH that includes

Re: [gentoo-user] Re: sudo not setting the path (was sudo not running a shell as a login shell)

2003-03-31 Thread Ric Messier
From an OpenBSD system: $ printenv PATH=/home/kilroy/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/loca l/sbin:/usr/games:. $ sudo printenv PATH=/home/kilroy/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/loca l/sbin:/usr/games:. Debian may be an abberation and I'm not convinced