Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been asked to setup a multimaster LDAP environment on Ubuntu 11.04 - instead of a single master server. I cloned the master server and recreated it into two VMs. I am trying to follow the instructions on the OpenLDAP documentation here:

http://www.openldap.org/doc/admin24/replication.html

and it talks about modifying the cn=config tree within LDAP. The subdirectory tree appears to be there at:

/etc/ldap/slapd.d/

and a

slapcat -b cn=config

drops out a load of config information. When I try to connect using a browser and the admin bind credentials:

ldapsearch -D '<adminDN>' -w <password> -b 'cn=config'

I get:

# extended LDIF
#
# LDAPv3
# base <> (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

I don't see the config context when I connect via an LDAP browser either. I'm sure I'm missing something, but I can't see what it is!

share|improve this question
add comment

2 Answers

Use your old slapd.conf if you have one or copy the one out of /usr/share/doc. If you've got your slapd.conf you can delete the slapd.d/* data and create a new slapd.d configuration from your slapd.conf with

slapadd -f slapd.conf -F slapd.d -n0

be sure to test your configuration with

slaptest -f slapd.conf

and be sure to own everything in slapd.d to openldap or any special ldap-user. OpenLDAP does not provide any slapd.conf file in the default installation. You could do everything with ldapmodify in "live"-Mode, but to provide the first-time-configuration you should use a slapd.conf and convert it.

cheers,

share|improve this answer
add comment

I believe you're using the wrong admin credentials.

Rather certain Ubuntu is setup to use root over SASL/EXTERNAL Unix Sockets as rootDN by default.

# {0}config, config  
dn: olcDatabase={0}config,cn=config  
olcRootDN: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth`

Try using sudo ldapsearch -H ldapi:/// -Y external -b cn=config

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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