I need to provide multiple values to gidNumber (assign users to multiple groups). I have tried something like: gidNumber "1000,4" or "1000","4" but it does not work.

I can only provide one value to gidNumber:

map    passwd uid           cn
map    passwd uidNumber     userID
map    passwd gidNumber     "1000"

You have to add group entries to your LDAP server, using object class posixGroup each with own gidNumber attribute value. Then you add the users to these groups by adding the user to the member attribute.

There are two different schemas for membership attributes:

  • RFC 2307: The attribute memberUid contains the username, most times the uid of the member's entry
  • RFC 2307bis: The attribute member contains the full DN of the member's entry

Which schema is installed on your LDAP server can be seen in the subschema subentry by looking at object class posixGroup.


This won't work - you can only have a single GID for a user since this is what the system used to determine what right to assign to objects like files when you create them.

Users can belong to multiple groups but they can only have a single Primary group. The The Wikipedia page has a good write up

  • ok then I have explained it incorrectly. I want users to belong to single Primary group but I also want users to belong to multiple other groups. May 15 '18 at 8:00
  • 1
    You can add the users using groupadd, it just won't show up in /etc/passwd or using getent - you will be able to see it with "id <username>" or by looking in /etc/group. May 16 '18 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.