Menu

#31 User added to initial group

open
nobody
None
5
2005-02-21
2005-02-21
Carlos
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.