Red Hat Bugzilla – Bug 1464445
Re-logging in does not re-load user groups
Last modified: 2017-06-23 08:54:01 EDT
Description of problem:
Logging out and back in does not re-load the user's groups.
Version-Release number of selected component (if applicable):
How reproducible: I tried several times, including with either X session or Wayland, all attempts had this problem.
Steps to Reproduce:
1. addgroup testgroup
2. usermod -a -G testgroup $USER
3. id -a $USER
4. log out of GNOME session
5. log in to GNOME again (using gdm)
6. id -a
uid=1000(alan-sysop) gid=1000(alan-sysop) groups=1000(alan-sysop),10(wheel),1003(testgroup)
uid=1000(alan-sysop) gid=1000(alan-sysop) groups=1000(alan-sysop),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
The groups in the output of `id -a $USER` and `id -a` should be the same, after logging out and back in again.
This is not 100% documented... the Fedora System Adminstrator's Guide doesn't mention *any* method to re-load groups, implying that they take effect immediately. However the behaviour is widely expected, e.g. https://unix.stackexchange.com/a/11573/29483
Rebooting gets the groups reloaded OK.
Originally I tried to restart gdm (while I was still logged in) - I know this forcibly logs you out. But for a while now this ends up with the screen constantly flickering, gdm seems to fail in a loop with "(WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted". So I was not able to test this.