After the apt-get update
and apt-get upgrade
run few days ago, user groups are not applied properly to the currently logged-in user.
I can see all the groups being properly saved in the /etc/passwd
and /etc/groups
but after the system restart only the default user group is being applied. I don't see any particular errors in syslog
.
After system startup only the default group is being applied to the user.
user@localhost:~$ id
uid=1000(user) gid=1000(user) groups=1000(user)
Though, when listing available groups they're visible but not currently attached to the session.
user@localhost:~$ id user
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),27(sudo),999(docker)
I need to manually login as the same user every time new shell session is created, then it works as expected.
user@localhost:~$ su user
user@localhost:~$ id
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),27(sudo),999(docker)
Any ideas what could caused this?
I have already tried:
- Log out / in
- Recreate groups
- Reassign groups to the user
As a bonus I can mention that the newgrp
behaves weird and it switches the main group instead of registering it with the others:
user@localhost:~$ newgrp docker
user@localhost:~$ id
uid=1000(user) gid=999(docker) groups=999(docker)
Thanks!