As of last Thursday, whenever I use any terminal (Konsole, Gnome Terminal, XFCE Termina, xterm), the groups
are empty.
$ groups
tom
When I execute the same command in a tty
terminal outside of Xorg, I get the correct groups:
$ groups
tom adm cdrom sudo plugdev docker libvirt
This is especially annoying since I now have to switch to a tty
whenever I want to use docker. It happens when I use KDE, i3 or XFCE, it does not seem to happen when I switch to Gnome Shell (but that has other problems so I don't want to use it) on Ubuntu 18.04 LTS.
Has some setting changed or how can I get my user groups back?
Addendum:
Output of commands I've been asked to run via comments. NOTE: I've rebooted this system multiple times, in case that matters, and my OS is Ubuntu 18.04 LTS.
xterm
$ id -a
uid=1000(tom) gid=1000(tom) groups=1000(tom)
tty
$ id -a
uid=1000(tom) gid=1000(tom) groups=1000(tom),4(adm),24(cdrom),27(sudo),46(plugdev),134(docker),140(libvirt)
xterm & tty - identical
$ getent group | grep tom
adm:x:4:syslog,tom,mtail
cdrom:x:24:tom
sudo:x:27:tom
plugdev:x:46:tom
tom:x:1000:
docker:x:134:tom
libvirt:x:140:tom
xterm & tty - identical
$ type -f groups
groups is /usr/bin/groups
tom
was part of these groups. I also frequently reboot my device, as I am one of the last people who actually switch off their laptop at the end of the working day. – Lanbo Jul 23 '18 at 08:52strace groups tom
in tty & terminal and compare them. I'm off to bed now. – slm Jul 23 '18 at 09:06