Bug 2419668

Summary: sudo dnf needs-restarting --services fails with [System.Error.ENOMEDIUM] Failed to open bus (No medium found)
Product: [Fedora] Fedora Reporter: Barry Scott <barry>
Component: dnf5Assignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 43CC: jonathan, pkratoch, ppisar, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-01-16 11:56:11 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:

Description Barry Scott 2025-12-06 11:21:41 UTC
The command `dnf needs-restarting  --services` only works when logged in as root or a user, but not via sudo or run0.

Found during a discussion on https://discussion.fedoraproject.org/t/how-can-i-dnf-upgrade-without-necessitating-restart/175779/4

I'm using an fully updated Fedora 43 KDE plasma desktop.
With dnf5-5.2.17.0-2.fc43.x86_64



Reproducible: Always

Steps to Reproduce:
1.Login as user
2.Run `sudo dnf needs-restarting  --services`

Actual Results:
$ sudo dnf needs-restarting  --services
[sudo] password for barry:
Updating and loading repositories:
Repositories loaded.
[System.Error.ENOMEDIUM] Failed to open bus (No medium found)

Expected Results:
Check performed without error

Additional Information:
Commands like `sudo systemctl status httpd`

Comment 1 Pavla Kratochvilova 2026-01-16 11:56:11 UTC

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