systemctl daemon-reexec does not update group membership

Bug #1811295 reported by Edward Gow
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Expired
Wishlist
Unassigned

Bug Description

On Ubuntu 16.04.4 LTS
using
Package: systemd
Architecture: amd64
Version: 229-4ubuntu21.10

Changes the group membership are not picked up by the systemd process for a logged-in user or for a user with enable-linger set regardless of login status. Evidently the

  systemctl --user daemon-reexec

command preserves group membership across the daemon restart. This is bad. It means that only a reboot or

  sudo loginctl terminate-user <user>

will update the group membership to the proper set. Both of those things are extreme disruptions for a system/user that runs servers.

Can systemctl daemon-reexec be made to update group membership for the user in the systemd process?

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Invalid
Changed in systemd (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Paul Donohue (s-launchpad-paulsd-com) wrote :

I encountered this same issue on Ubuntu 22.04.03 LTS (systemd 249.11-0ubuntu3.11).

After `usermod -a -G <group> <user>`, processes that are spawned or restarted by systemd user service units do not pick up the new group (`grep Group /proc/<PID>/status` does not include the new group) until after the `systemd --user` process is killed using `sudo loginctl terminate-user <user>` (which logs the user out) or `sudo systemctl restart user@<UID>.service` (which doesn't log the user out but effectively breaks the user's session) or something similar. Neither `systemctl --user daemon-reload` nor `systemctl --user daemon-reexec` helps. There doesn't appear to be any non-disruptive way to pick up the group change.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

This sounds like a question better suited for upstream. Please open a bug there instead: https://github.com/systemd/systemd/issues

Changed in systemd (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.