Also I believe it gets built with --disable-path and quite a few other security features, to help protect you from exploits:) Do sudo -V as root, and check the ebuild for the conf options. Please note that if you run commands outside the user path, you must execute the complete path, ie when I shutdown I do "sudo /sbin/poweroff" whereas cannot do "sudo poweroff". Thats the way it's supposed to work:)
On Mon, 31 Mar 2003 14:49:55 -0500 "Ric Messier" <[EMAIL PROTECTED]> wrote: > 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), > sudo doesn't provide root's environment. you are running with an effective > uid of root which is slightly different. > > put the appropriate dirs into your path and you should be fine. alternately, > i seem to recall that some versions of su provide a switch like -c which > allows you to specify a command. i don't remember if that spawns an > appropriate environment (which is really what you are looking for) or if you > could tag a - (which would inherit the correct environment vars, run the > login scripts, etc). > > if i'm completely dazed and providing incorrect information, i'm sure > someone will correct me. > > > ----- Original Message ----- > From: "William Hubbs" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 31, 2003 2:32 PM > Subject: [gentoo-user] Re: sudo not setting the path (was sudo not running a > shell as a login shell) > > > > 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 the /etc/sudoers file that comes with emerging sudo, with the > line uncommented that allows users in the wheel group to run commands as > root with their passwords, and the user is in the wheel group. What am I > missing? > > > > > -- > [EMAIL PROTECTED] mailing list > -- Chuck Brewer Registered Linux User #284015 Get my gpg public key at pgp.mit.edu!! Encrypted e-mail preferred.
pgp00000.pgp
Description: PGP signature