Adding /sbin and /usr/sbin to everyone's path in F10

Axel Thimm Axel.Thimm at ATrpms.net
Wed Apr 23 19:02:40 UTC 2008


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 at victor ~]$ ifconfig
bash: ifconfig: command not found
[thimm at victor ~]$ sudo -i
[root at victor ~]# which ifconfig
/sbin/ifconfig
[root at victor ~]# 

But unfortunately sudo -i <command> doesn't seem to work quite yet:

[thimm at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20080423/e68ffb4b/attachment.sig>


More information about the fedora-devel-list mailing list