With cpu 1.4.3 and the following configuration:
USERGROUPS = no
USERS_GID = 1000
when doing:
cpu useradd testuser
testuser gets explicitly added to group 1000:
$ cpu cat passwd | grep testuser
testuser:x:100:1000::/home/testuser:/bin/bash
testgroup:x:1000:testuser
I've modified CPU's source to try to avoid this behaviour and it
seems to work for me:
$ diff orig/cpu-1.4.3/src/plugins/ldap/user.c
cpu-1.4.3/src/plugins/ldap/user.c
425c425
< if (ldapres > 0)
---
> /* if (ldapres > 0)
428c428
< }
---
> }*/
I haven't sent this in as a patch because I'm not confident
enough with CPU source, but to me the problem seems to be
that ldapUserCheck() also adds the user to the group when
globalLdap->gid is not NULL. AFAIK, this gid is the ascii name
of the user's initial group, to which he doesn't need to be
added.
Best regards,
Carlos