Bug 2354820

Summary: Remove '/usr/sbin' from the default PATH
Product: [Fedora] Fedora Reporter: Miroslav Lisik <mlisik>
Component: opensshAssignee: Dmitry Belyavskiy <dbelyavs>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: crypto-team, dbelyavs, dwalsh, extras-qa, jjelen, lkundrak, mattias.ellert, tm, tojeline, zbyszek
Target Milestone: ---Keywords: Triaged
Target Release: ---Flags: fedora-admin-xmlrpc: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: openssh-9.9p1-10.fc42 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: 2352387 Environment:
Last Closed: 2025-03-30 00:16:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2352387    
Bug Blocks:    

Description Miroslav Lisik 2025-03-25 12:10:58 UTC
+++ This bug was initially created as a clone of Bug #2352387 +++

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

--- Additional comment from Fedora Update System on 2025-03-18 16:59:08 CET ---

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

--- Additional comment from Fedora Update System on 2025-03-18 19:11:54 CET ---

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.

--- Additional comment from Zbigniew Jędrzejewski-Szmek on 2025-03-18 21:33:49 CET ---

Follow-up: https://src.fedoraproject.org/rpms/openssh/pull-request/97

Comment 1 Fedora Update System 2025-03-26 15:42:13 UTC
FEDORA-2025-398f3319ba (openssh-9.9p1-10.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-398f3319ba

Comment 2 Fedora Update System 2025-03-28 15:25:37 UTC
FEDORA-2025-398f3319ba has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-398f3319ba`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-398f3319ba

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2025-03-30 00:16:29 UTC
FEDORA-2025-398f3319ba (openssh-9.9p1-10.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.