Bug 143824 - root path after su should have sbin directories
root path after su should have sbin directories
Status: CLOSED DUPLICATE of bug 458176
Product: Fedora
Classification: Fedora
Component: rootfiles (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Ben Levenson
:
: 187359 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-29 01:26 EST by Christopher Beland
Modified: 2014-03-16 22:51 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-23 13:46:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christopher Beland 2004-12-29 01:26:24 EST
After freshly installing Fedora Core 3, I logged in as beland and su'd
to root and typed "service network restart".  This failed because
"service" was not in my path.

When both root and beland use /bin/bash as shells, I get the following
results...

Path when I log in as beland:
 /usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
Path when I su to root from beland:
 /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
Path when I log in as root:
 /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin

Using /bin/tcsh, the only difference is when I log in as root:
 /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin

The upshot of this bug is that /usr/local/sbin, /sbin, and /usr/sbin
should appear in root's path after an su, and they don't (for both
bash and tcsh).

I'm not sure why /root/bin should be in there at all, considering that
it doesn't exist after a fresh install.

Beland
Comment 1 Bill Nottingham 2004-12-29 19:54:25 EST
Use 'su -' to start a login shell as root.
Comment 2 Ignacio Vazquez-Abrams 2006-03-30 09:16:16 EST
*** Bug 187359 has been marked as a duplicate of this bug. ***
Comment 3 Christopher Beland 2006-03-30 14:06:39 EST
"su -" changes the current working directory to /root, which is somewhat
inconvenient when you're in the middle of something, so I don't do that.  Around
the office, everyone I've seen change to root uses "su" instead of "su -", and
has hit the /sbin problem when I tell them how to stop and start services. 
Apparently the person who reported 187359 has also tripped over this problem. 
Is there anything else that "su -" does that makes a difference?  It seems like
an easy fix to patch the path, to make the interface a little more user-friendly.
Comment 4 Matthew Miller 2006-07-10 18:46:04 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 5 Christopher Beland 2008-01-23 16:57:45 EST
This is still an issue in Fedora 8.
Comment 6 Christopher Beland 2008-09-23 10:49:51 EDT
According to:

http://fedoraproject.org/wiki/Features/SbinSanity

this will be fixed in Fedora 10.  It's not fixed in Fedora 10 Alpha, but perhaps it will be in the beta release.
Comment 7 Bill Nottingham 2008-09-23 13:46:11 EDT

*** This bug has been marked as a duplicate of bug 458176 ***

Note You need to log in before you can comment on or make changes to this bug.