Hi Paul, Thanks very much for the explanation! I'm coming from an Ubuntu world where it seems they didn't follow Debian's lead in this case ;-).
As this does seem to be distro-dependent, I'll maintain my patch as being a reasonable workaround and now understand why meta uses non-sbin path. Cheers, Ash On Tue, Feb 3, 2015 at 2:40 AM, Paul Eggleton <paul.eggle...@linux.intel.com> wrote: > 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 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto