Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
/usr/local/bin is missing from root's $PATH, /usr/local/sbin, /usr/sbin, and /sbin are present in users' $PATHs.
Version-Release number of selected component (if applicable):
setup-2.8.14-1.el6.noarch
How reproducible: always
Steps to Reproduce:
1. privenv PATH (as user and as root)
Actual results:
For root:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
For user:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
Expected results:
Additional info:
The relevant path of /etc/profile is:
----%<----
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
pathmunge /sbin after
fi
----%<----
I think it should be something like:
----%<----
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
pathmunge /usr/local/bin after
pathmunge /usr/bin after
pathmunge /bin after
----%<----
Thanks for report.
Actually, sbin directories should be available to normal non-root users in RHEL-6 - see https://fedoraproject.org/wiki/Features/SbinSanity and related bzilla https://bugzilla.redhat.com/show_bug.cgi?id=458176 for details. So that part of the bugzilla report is notabug and expected behaviour.
Second one - /usr/local/bin is missing is based on the "init path" - on the way you are starting the shell. See http://www.faqs.org/docs/Linux-mini/Path.html for some details.
Closing NOTABUG (as this is not a bug in setup package), if you think /usr/local/bin should be set in "init path" for root in some specific situation where is not set at the moment, feel free to report it against particular component responsible for the "init path" - bash? in your case (see `strings /bin/bash | grep /usr/local/bin`) ...
Description of problem: /usr/local/bin is missing from root's $PATH, /usr/local/sbin, /usr/sbin, and /sbin are present in users' $PATHs. Version-Release number of selected component (if applicable): setup-2.8.14-1.el6.noarch How reproducible: always Steps to Reproduce: 1. privenv PATH (as user and as root) Actual results: For root: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin For user: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin Expected results: Additional info: The relevant path of /etc/profile is: ----%<---- # Path manipulation if [ "$EUID" = "0" ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin else pathmunge /usr/local/sbin after pathmunge /usr/sbin after pathmunge /sbin after fi ----%<---- I think it should be something like: ----%<---- # Path manipulation if [ "$EUID" = "0" ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin fi pathmunge /usr/local/bin after pathmunge /usr/bin after pathmunge /bin after ----%<----