Bug 1795555

Summary: Provide a way for privileged users to interact with systemd user instances
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: systemdAssignee: Jacek Migacz <jmigacz>
Status: CLOSED MIGRATED QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: high    
Version: 8.1CC: dtardon, jamacku, jmigacz, lnykryn, sbalasub, svaughn, systemd-maint-list
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 10:55:01 UTC Type: Story
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Renaud Métrich 2020-01-28 10:12:48 UTC
Description of problem:

With RHEL8.x, users can have their own systemd instance, but there is no way for the root user or privileged users (e.g. in "wheel" group) to manage the systemd user instances at all.

So far, the only way is to use "sudo+XDG_RUNTIME_DIR" which is not a good solution: 

$ sudo -u user1 /bin/bash -c "export XDG_RUNTIME_DIR=/run/user/$(id -u user1); /usr/bin/systemctl --user list-units"


Version-Release number of selected component (if applicable):

systemd-239+


How reproducible:

N/A


Additional info:


See also:
https://github.com/systemd/systemd/issues/14580

Comment 3 David Tardon 2021-01-04 12:57:14 UTC
*** Bug 1907903 has been marked as a duplicate of this bug. ***

Comment 11 David Tardon 2023-05-16 08:49:56 UTC
(In reply to Renaud Métrich from comment #0)
> $ sudo -u user1 /bin/bash -c "export XDG_RUNTIME_DIR=/run/user/$(id -u
> user1); /usr/bin/systemctl --user list-units"

This can be shortened a bit:

$ sudo -u user1 XDG_RUNTIME_DIR=/run/user/$(id -u user1) systemctl --user list-units

Comment 16 RHEL Program Management 2023-09-21 10:48:54 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 17 RHEL Program Management 2023-09-21 10:55:01 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.