Tag Archives: systemd

Linux group membership change appears to be ignored

If changes to group memberships appear to be ignored on a recent Linux system, even after logging out and then in, the likely reason is that the time between log out and log in was too short, and the user service did not terminate and restart. A system reboot will sort the problem, but could be seen as a bit of an overkill.

Much better is simply to wait longer before logging in again giving sufficient time for the user service to terminate, or explicitly restart the user service. Restarting the user service can in fact be used to log a user out:

sudo systemctl restart user@<uid>.service

Replace <uid> with your actual user ID.