Bug 143824 - root path after su should have sbin directories
Summary: root path after su should have sbin directories
Status: CLOSED DUPLICATE of bug 458176
Alias: None
Product: Fedora
Classification: Fedora
Component: rootfiles
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Ben Levenson
: 187359 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-29 06:26 UTC by Christopher Beland
Modified: 2014-03-17 02:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-09-23 17:46:11 UTC
Type: ---

Attachments (Terms of Use)

Description Christopher Beland 2004-12-29 06:26:24 UTC
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

Path when I log in as beland:
Path when I su to root from beland:
Path when I log in as root:

Using /bin/tcsh, the only difference is when I log in as root:

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.


Comment 1 Bill Nottingham 2004-12-30 00:54:25 UTC
Use 'su -' to start a login shell as root.

Comment 2 Ignacio Vazquez-Abrams 2006-03-30 14:16:16 UTC
*** Bug 187359 has been marked as a duplicate of this bug. ***

Comment 3 Christopher Beland 2006-03-30 19:06:39 UTC
"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 22:46:04 UTC
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 21:57:45 UTC
This is still an issue in Fedora 8.

Comment 6 Christopher Beland 2008-09-23 14:49:51 UTC
According to:


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 17:46:11 UTC

*** 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.