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

Nicolas François Nicolas François , 113191@bugs.debian.org
Wed, 30 Mar 2005 22:12:20 +0200


Hi,

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 by
id, or any command using getgroups (I did not test this last one).

newgrp can be used to switch to any of the supplementary (non effective)
groups he belongs to without any passwd (the ones displayed by id).
Since this list of groups is set at login, this behavior won't be changed.

However, newgrp can also be used to switch to any group with a password in
/etc/gshadow, or without password to any group he belongs to in this
/etc/gshadow file.
So, if you add your userID to a group in /etc/gshadow, then you will be
able to switch to this group.

Since, adduser and usermod change both /etc/group and /etc/gshadow, I
think this bug can be closed after an update to the newgrp man page (and a
maybe a new gshadow page).

I don't recommend to edit manually /etc/group.

Regards,
-- 
Nekral