According to openldap quick start guide #8 you don't have to change the ldap.conf, but you have to create an auxilliary .ldif-file and to perform ldapadd upon it:
#example .ldif-file for domain example.com
dn: olcDatabase=bdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcMdbConfig
olcDatabase: bdb
OlcDbMaxSize: 1073741824
olcSuffix: dc=example,dc=com
olcRootDN: cn=Manager,dc=example,dc=com
olcRootPW: secret
olcDbDirectory: /usr/local/var/openldap-data
olcDbIndex: objectClass eq
Call it, for example, test.ldif and use this command to add it to your database:
ldapadd -x -D "cn=admin,dc=example,dc=com" -w <password> -H ldap:// -f test.ldif
cn=admin
can not work for you, it depends on how did you called your user
-w <password>
is where you need to specify your password, without <>
I guess you would want to know, that configuring OpenLDAP with slapd.conf is deprecated and soon will not be supported. Using new method with ldif-files and cn=config has many pros, for example you don't need to restart the server after changing system databases.
Using bdb
and hdb
is also undesirable, they use Oracle BerkleyDB and OpenLDAP wants to go further with their own DB-backend, the mdb
.