I've been trying to setup an OpenLDAP installation for two domains and I've found out that to do such a thing, one has to set up two databases.
In my quest to do so, I've stumbled upon this stack overflow question which uses a second backend (bdb
) to accomplish that, but unfortunately, OpenLDAP doesn't come with the bdb
backend anymore, so I've been trying to set up a second database with the mdb
backend
but I haven't been able to.
The ldif
file to create the database:
dn: olcDatabase=mdb2,cn=config
changetype: add
objectClass: olcDatabaseConfig
objectClass: olcMdbConfig
olcDbDirectory: /var/lib/ldap2/
olcDatabase: mdb
olcDbIndex: objectClass eq
olcDbIndex: cn,uid eq
olcDbIndex: uidNumber,gidNumber eq
olcDbIndex: member,memberUid eq
olcLastMod: TRUE
olcSuffix: dc=domain2,dc=com
olcAccess: to attrs=userPassword by self write by anonymous auth by * none
olcAccess: to attrs=shadowLastChange by self write by users read
olcAccess: to * by users read
olcRootDN: cn=admin,dc=domain2,dc=com
olcRootPW: {SSHA}<HASH>
Executing the ldif
returns:
value of single-valued naming attribute 'olcDatabase' conflicts with value present in entry
Trying to swap olcDatabase: mdb
for olcDatabase: mdb2
returns: Unrecognized database type (mdb2)
Is there any way to have two databases with the same backend in OpenLDAP?