On Wed, Apr 23, 2008 at 01:41:55PM -0400, Jesse Keating wrote: > On Wed, 2008-04-23 at 20:33 +0300, Axel Thimm wrote: > > In a nutshell: Keep things as are, but if there really is a command > > that is used by "normal" users move that out of sbin or make a symlink > > (commands that used to live in sbin and moved out are for example > > ping and traceroute) > > If we were to keep things the way they are, we need to munge sudo so > that it takes into account the sbin paths. Continually doing "sbin foo" > and getting foo not found is infuriating to no end, combined with the > guessing game of "is it /sbin or /usr/sbin I must call out on this > system this week". sudo has something pointing in the right direction, the "-i" flag. It properly initializes to the target user's shell and presents the environment that that user would see including the proper PATH: [thimm@victor ~]$ ifconfig bash: ifconfig: command not found [thimm@victor ~]$ sudo -i [root@victor ~]# which ifconfig /sbin/ifconfig [root@victor ~]# But unfortunately sudo -i <command> doesn't seem to work quite yet: [thimm@victor ~]$ sudo -i ifconfig /sbin/ifconfig: /sbin/ifconfig: cannot execute binary file Maybe just a bug that needs to be fixed (note that it *did* find ifconfig, it just somehow messed up calling it). Obviouly sudo -i invokes the shell with the argument "ifconfig", while it should simply pipe it into the invoked shell (or use -c). FWIW my poor man's working sudo is sudo bash -lc ifconfig But it would be better to fix sudo. -- Axel.Thimm at ATrpms.net
Attachment:
pgpTAtPKgyM2g.pgp
Description: PGP signature
-- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list