I’m answering my own question because I wanted to know how to solve the problem while using the new slapd.d/dynamic/cn=config backend and I didn’t wanted going back to the slapd.conf method.
When I try to add the new schema using ldapadd, I was always getting the following error:
ldapadd -H ldap://whatever.test.com -D "cn=admin,dc=whatever,dc=test,dc=com" -x -W -f mozillaabpersonalpha.ldif ldap_add: Insufficient access (50)
So the BindDN I was using does not have that privileges. I would need to setup an ACL or to use the rootDN for that operation.
I don’t know why, but when configuring the slapd
debian package, it allowed me to create an admin account for my on DIT, but it mentioned nothing about the rootDN. After some browsing, I found this Blog that explains how to set the password of the rootDN while using the cn=config schema.
So, edit the file
/etc/ldap/slapd.d/cn=config/olcDatabase\=\{0\}config.ldif
and add the following:
olcRootDN: cn=admin,cn=config olcRootPW: mypassword
I had to restart the slapd for the changes to take effect (It shouldn’t be necessary, but …). In order to test it, I ran the following command:
ldapwhoami -H ldap://whatever.test.com -D "cn=admin,cn=config" -x -w mypassword
And it worked! The next step was to load the mozillaAbPersonAlpha schema in ldif format using ldapadd:
ldapadd -H ldap://whatever.test.com -D "cn=admin,cn=config" -x -w mypassword -f mozillaabpersonalpha.ldif
The response was successful