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 # XTerm uid=1000(tom) gid=1000(tom) groups=1000(tom) tty
$ id -a # tty 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 # identical 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 # identical groups is /usr/bin/groups