Bug#113191: [Pkg-shadow-devel] Bug#113191: login: newgrp: can't change to groups added to /etc/group since login

Christian Perrier Christian Perrier <bubulle@debian.org>, 113191@bugs.debian.org
Thu, 31 Mar 2005 07:48:21 +0200


Quoting Nicolas Fran=E7ois (nicolas.francois@centraliens.net):
> Hi,
>=20
> I confirm a user can't use newgrp (or sg) to switch to a group added to
> /etc/group since its last login.  Also, this group won't be displayed b=
y
> id, or any command using getgroups (I did not test this last one).


Well, I *do not* confirm this.

Window 1:

root@mykerinos:~# su - tintin
tintin@mykerinos:~$ id
uid=3D1000(tintin) gid=3D100(users) groups=3D100(users)
tintin@mykerinos:~$ newgrp audio
Password:
Sorry.
tintin@mykerinos:~$     =20


I do NOT logout from this shell and in anothe window (window 2):

root@mykerinos:/etc/pam.d# addgroup herge
Adding group `herge' (1006)...
Fait.
root@mykerinos:/etc/pam.d# adduser tintin herge
Ajout de l'utilisateur tintin au groupe herge...
Fait.



Going back to "tintin" shell in window 1:

tintin@mykerinos:~$ newgrp herge
tintin@mykerinos:~$ id
uid=3D1000(tintin) gid=3D1006(herge) groups=3D100(users),1006(herge)
tintin@mykerinos:~$ touch foo
tintin@mykerinos:~$ ls -la foo
-rw-r--r--  1 tintin herge 0 Mar 31 07:47 foo


So, where's the bug?