getgroups() gives wrong result with nss_winbind
jra at samba.org
Thu Sep 16 22:10:52 GMT 2004
On Thu, Sep 16, 2004 at 06:09:35PM -0300, Andreas wrote:
> I'm having some strange errors with group membership in samba-3.0.7 (not
> sure about other version).
> There is this user (marcia) belonging to over 200 groups. However, when she calls
> getgroups(2), only 64 are returned.
> This user is a member of a lot of groups:
> [DOMAIN\marcia at pandora ~]$ getent group | grep marcia|wc -l
> getgroups(0,NULL), however, returns only 64:
> [DOMAIN\marcia at pandora ~]$ /tmp/getgroups
> (/tmp/getgroups just prints the output of getgroups(0,NULL)).
> "id" also has a funny behaviour. When called as that user without arguments, lists
> only 64 groups (strace shows that is uses getgroups()). Now, if called, again as
> this same user, but supplying the username as argument, all groups are correctly listed:
> (I'm not listing all 200 groups here, just a piped output to wc showing that the results
> [DOMAIN\marcia at pandora ~]$ id|wc
> 1 7 1815
> [DOMAIN\marcia at pandora ~]$ id DOMAIN\\marcia|wc
> 1 7 5970
Can you get a debug level 10 log of winbindd returning the short numbers
of groups ?
More information about the samba-technical