Score:0

Cannot enable OpenLDAP memberOf of Ubuntu 20.04

cn flag

I've spent the last few days following multiple how to guides to create an LDAP server with memberOf enabled, on a fully updated clean install of Ubuntu Server 20.04.2, purging between each attempt.

Most recently I've tried using the Perl Module slapdconf (https://github.com/Evolveum/slapdconf). The commands I ran were:

sudo apt install slapd ldap-utils
sudo apt install libnet-ldap-perl libauthen-sasl-perl perl-doc
git clone https://github.com/Evolveum/slapdconf.git
cd slapdconf/
sudo cp ldap* /usr/local/bin/
sudo cp schema2ldif /usr/local/bin/
sudo cp slapd* /usr/local/bin/
sudo dpkg-reconfigure slapd
# creating mydomain.tld
sudo slapdconf list-suffixes
# confirmed mydomain.tld is the only suffix
sudo slapdconf add-module memberof
# No errors
sudo slapdconf add-overlay dc=mydomain,dc=tld memberof
# No errors
sudo slapdconf add-module refint
# No errors
sudo slapdconf add-overlay dc=mydomain,dc=tld refint olcRefintConfig 'olcRefintAttribute:memberof member manager owner'
# No errors

After doing this I configured phpldapadmin, logged in and created cn=test,ou=groups,dc=mydomain,dc=tld and cn=Fred Bloggs,ou=people,dc=mydomain,dc=tld and added Fred Bloggs to the test group. however, running ldapsearch -x -LLL -H ldap:/// -b "cn=Fred Bloggs,ou=people,dc=mydomain,dc=tld" dn memberof only returns the dn and no memberOf property.

I've tired doing this manually following different varients of https://blog.adimian.com/2014/10/15/how-to-enable-memberof-using-openldap/ too.

Please can someone let me know what I'm missing, or suggest an alternative LDAP server that has working memberOf overlay.

I've seen a few questions on different forums around getting memberOf to work, but none of the accepted solutions I've seen have worked for me, and they are all for much older versions of Ubuntu.

Thanks Joe

Score:0
cn flag

It turns out I was creating the wrong type of group, and that is why memberOf was never created.

In PHPLDAPAdmin the create child type list offers posixGroup, but this is not the right option.

Anyone finding this later, you need to select default, and then groupOfNames from the big list.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.