I think i have to add all the databse  derectives in slapd.conf

by adding this before  "databse mdb" i was able to make it work.

database        config
# rootdn directive for config
rootdn          "cn=admin,cn=config"
rootpw          {SSHA}XXXXXXXXX
###
databse mdb

Thanks,
Ram


On Mon, Oct 2, 2017 at 2:21 PM, rammohan ganapavarapu <rammohanganap@gmail.com> wrote:
Quanah,

My slapd.d dir is empty and my initialization script only create config if slapd.d dir is empty, i tried with slapd.conf  every thing looks good except i don't find a way to connect to cn=config db as i don't see roodDN in "cn\=config/olcDatabase\=\{0\}config.ldif" 

Thanks,
Ram





On Mon, Oct 2, 2017 at 1:35 PM, Quanah Gibson-Mount <quanah@symas.com> wrote:
--On Monday, October 02, 2017 2:19 PM -0700 rammohan ganapavarapu <rammohanganap@gmail.com> wrote:



Hi,



I am trying to follow this thread (
http://blog.roeften.com/2015/03/openldap-24-on-centos-7-using-mdb.html )
to initialize the ldap config in non-default directory but i am getting
this error.


cat example.ldif | slapadd -v -F /opt/data/slapd.d -n 0 -d -1




59d29ce6 >>> dnPrettyNormal: <cn=config>
59d29ce6 <<< dnPrettyNormal: <cn=config>, <cn=config>
59d29ce6 str2entry: entry -1 has multiple DNs "cn=config" and
"cn=module,cn=config"
slapadd: could not parse entry (line=1)


If i add one by one (one dn at a time) it seems to be working.


Any idea?

Well, if you already have your own cn=config database, then you're just making a real mess out of it.  That would be my guess.  I'm not sure why you're following some random "how to" guide.  If you already had a working slapd.conf, then all you needed to do was convert it to cn=config using "slaptest".

--Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>