Bug 2352387 - Remove '/usr/sbin' from the default PATH
Summary: Remove '/usr/sbin' from the default PATH
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dmitry Belyavskiy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2354820
TreeView+ depends on / blocked
 
Reported: 2025-03-13 16:50 UTC by Miroslav Lisik
Modified: 2025-03-25 12:10 UTC (History)
9 users (show)

Fixed In Version: openssh-9.9p1-13.fc43
Clone Of:
: 2354820 (view as bug list)
Environment:
Last Closed: 2025-03-18 18:11:54 UTC
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-1514 0 None None None 2025-03-13 16:50:58 UTC

Description Miroslav Lisik 2025-03-13 16:50:22 UTC
There has been bin/sbin merge since Fedora-42 https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin.

Openssh still sets default PATH with '/usr/sbin' path.



Reproducible: Always

Steps to Reproduce:
1. connect to a host as a root and check the PATH
2. connect to a host as a user and check the PATH


Actual Results:  
1)
# env | grep ^PATH
PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

2)
$ env | grep ^PATH
PATH=/home/testuser/.local/bin:/home/testuser/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

Expected Results:  
PATH does not contain /usr/sbin

openssh-9.9p1-12.fc43.x86_64

Comment 1 Fedora Update System 2025-03-18 15:59:08 UTC
FEDORA-2025-49ccf029e9 (openssh-9.9p1-13.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-49ccf029e9

Comment 2 Fedora Update System 2025-03-18 18:11:54 UTC
FEDORA-2025-49ccf029e9 (openssh-9.9p1-13.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Zbigniew Jędrzejewski-Szmek 2025-03-18 20:33:49 UTC
Follow-up: https://src.fedoraproject.org/rpms/openssh/pull-request/97


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