[yocto] Adding 'sbin' to default path
Paul Eggleton
paul.eggleton at linux.intel.com
Tue Feb 3 02:40:33 PST 2015
Hi Ash,
On Friday 30 January 2015 10:28:21 Ash Charles wrote:
> Why does the PATH variable in the dot.bashrc shipped by the base-files
> not include 'sbin' paths? It seems like any interactive user should
> be able to call e.g. 'ifconfig' informationally---they should, and
> would still be, blocked from calling 'ifconfig eth0 up'
>
> After looking at the PATH for a generic user on my local Ubuntu
> system, I just added a patch to my meta layer to add the following
> line to the dot.bashrc:
>
> export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
>
> It seems to work well---users created with the extrauser class pull
> this default from the skel.
>
> As this is security related though, I wanted to ask the question to
> make sure I'm not doing something silly, dangerous or otherwise
> idiotic.
I think this is largely a distro decision - some distros include the sbin
directories to PATH for all users (e.g. Fedora), others reserve that for root
only (e.g. Debian) on the assumption that everything in /sbin and /usr/sbin is
intended for administration rather than normal users. I guess we are just
picking up the default from base-files which comes from Debian.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list