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

Shawn Starr sstarr at platform.com
Wed Apr 23 17:25:44 UTC 2008


> -----Original Message-----
> From: fedora-devel-list-bounces at redhat.com
> [mailto:fedora-devel-list-bounces at redhat.com]On Behalf Of Shawn Starr
> Sent: Wednesday, April 23, 2008 1:14 PM
> To: Development discussions related to Fedora
> Subject: RE: Adding /sbin and /usr/sbin to everyone's path in F10
> 
> 
> > -----Original Message-----
> > [mailto:fedora-devel-list-bounces at redhat.com]On Behalf Of 
> Richard W.M.
> > Jones
> > Sent: Wednesday, April 23, 2008 11:58 AM
> > To: Development discussions related to Fedora
> > Subject: Re: Adding /sbin and /usr/sbin to everyone's path in F10
> > 
> > 
> > On Wed, Apr 23, 2008 at 11:30:31AM -0400, Tom spot Callaway wrote:
> > > I propose that we add /sbin and /usr/sbin to the path for 
> > normal users
> > > (as well as root) for F10? There are plenty of useful tools 
> > in there for
> > > non-root users (ifconfig, fdisk, parted), and IMHO, any tool which
> > > assumes the user is root because it lives in /sbin is 
> fundamentally
> > > broken. The LSB doesn't mandate this (at least, not 
> > anywhere I can see),
> > > so I propose that we just do it.
> > > 
> > > Anyone opposed to such an action?
> > 
> > FWIW, Debian doesn't have these in normal users' PATH, but 
> does change
> > the PATH to include them when you do 'su'.
> > 
> > On a Debian system:
> > 
> >   $ echo $PATH
> >   
> /home/rich/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> >   $ su
> >   Password: 
> >   # echo $PATH
> >   
> > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
> > usr/bin/X11
> > 
> > I don't know how Debian does this, but it's extremely useful.
> > 
> > Rich.
> > 
> > -- 
> > Richard Jones, Emerging Technologies, Red Hat  
> 
> They use  (this comes from /etc/login.defs)
> 
> ENV_SUPATH      
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> ENV_PATH        PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
> 
> I am not sure though if the PAM modules also read login's 
> /etc/login.defs file (it seems to be though they do)
> 
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/games
> 
> $ su
> Password:
> # echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> 
> 

To reply to myself:

dpkg -S reveals /bin/su on Debian to be from the login package

Fedora's /bin/su comes from coreutils. So there is a difference, the latter of course being more modern. Though login's su lets you ctl+c a bad password without waiting for su to return a bad authentication message.




More information about the fedora-devel-list mailing list