Missing groups at each startup

Update2:

This seems to be a lightdm / kwallet bug, see here: https://bugs.launchpad.net/lightdm/+bug/1781418 and here: https://bugzilla.redhat.com/show_bug.cgi?id=1581495

Commenting out

auth optional pam_kwallet.so
auth optional pam_kwallet5.so

to

#auth optional pam_kwallet.so
#auth optional pam_kwallet5.so

in /etc/pam.d/lightdm - as suggested in the link above, solves the problem for now.


Update:

This seems to be an issue with lightdm. Switching to GDM solved the issue temporarily for me. Still don't know what's wrong with lightdm though.


I have exactly the same issue (Ubuntu 18.04). I don't have a solution yet, but I noticed, that everything is correct when I log in via ssh or a text console, but not when I open a terminal emulator on my desktop environment. Is this the same for you? Maybe it has something to do with some pam-files?

Also weird: correct would be:

uid=1000(catscrash) gid=1000(catscrash) Gruppen=1000(catscrash),4(adm),6(disk),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),132(vboxusers),136(libvirtd)

wrong is

uid=1000(catscrash) gid=1000(catscrash) Gruppen=1000(catscrash)

now I can do

catscrash@catscrash-desktop ~ % newgrp adm
catscrash@catscrash-desktop ~ % newgrp catscrash
catscrash@catscrash-desktop ~ % id
uid=1000(catscrash) gid=1000(catscrash) Gruppen=1000(catscrash),4(adm)
catscrash@catscrash-desktop ~ % newgrp sudo
catscrash@catscrash-desktop ~ % id
uid=1000(catscrash) gid=27(sudo) Gruppen=27(sudo),4(adm),1000(catscrash)
catscrash@catscrash-desktop ~ % newgrp catscrash
catscrash@catscrash-desktop ~ % id
uid=1000(catscrash) gid=1000(catscrash) Gruppen=1000(catscrash),4(adm),27(sudo)
catscrash@catscrash-desktop ~ %                                                                                                                                                                                                          

So it definitely knows about my groups, as I couldn't do that with groups I'm not in, and once I changed the primary group and back, those groups appear... weird!

I also noticed, that this only happens in KDE / plasmashell, is this the same for you? When logging in via gnome shell everything works fine.