How to know which berkley db openldap is refering to?

Solution 1:

It looks like you should only have 1 root there, each new root contains a

database        bdb
suffix  "dc=limepepper,dc=org"
directory       /var/lib/ldap/mycompany.org

type block.

Have you initialized the new root?

I think you need to create a new root ldif file, and import those entries into the running LDAP server like so;

# cat /home/myuser/mynewroot.ldif
dn: dc=COMPANY,dc=CP
objectclass: dcObject
objectclass: organization
o: COMPANY CP
dc: COMPANY

dn: cn=Manager,dc=COMPANY,dc=CP
objectclass: organizationalRole
cn: Manager

and then import that into the empty LDAP server like so;

# ldapadd -x -D "cn=Manager,dc=COMPANY,dc=CP" -W -f   /home/myuser/mynewroot.ldif

There is a tutorial on setting up new roots here;
http://www.howtoforge.com/linux_openldap_setup_server_client

and some more details on what you need in the minimal root here;
http://www.openldap.org/doc/admin22/dbtools.html