How to change the memberof overlay's objectClass to groupOfUniqueNames

configuration, ldap, openldap, referential-integrity

Solution

Use the following to change the memberof behaviour. I'm showing the solution here for a traditional slapd.conf configuration.

memberof-group-oc   groupOfUniqueNames
memberof-member-ad  uniqueMember

As for the referential integrity, you can use the memberof overlay's own setting to do this, which is much easier:

memberof-refint     true

For cn=config, you probably therefore want the following:

olcMemberOfRefInt: TRUE
olcMemberOfGroupOC: groupOfUniqueNames
olcMemberOfMemberAD: UniqueMember

Problem

I am running OpenLDAP 2.4.31. Based on Reverse Group Membership Maintenance: The memberof overlay updates an attribute (by default memberOf) whenever changes occur to the membership attribute (by default member) of entries of the objectclass (by default groupOfNames) configured to trigger updates. I would like to change these defaults, so the overlay is based on the objectClass `groupOfUniqueNames` and the attribute `uniqueMember`. I did not find any mention on how to do this in the documentation, and also I did not find any default setting for this in `cn=config`; what are the settings that I have to add here to make the desired changes? I have already added the memberof and referential integrity configuration to `cn=config` based on this article.

Original source