Details
Description
It is common when running in chroot to have root's group vector preserved when running as your self.
For example
- Enter chroot
$ sudo chroot /myroot
- still root
$ whoami
root
- switch to user preserving root's group vector
$ sudo -u user -P -s
- root's groups
$ groups root
a b c
- user's real groups
$ groups user
d e f
- user's effective groups
$ groups
a b c d e f
-------------------------------