ldap - Create Root domain in OpenLDAP through command line -


i trying create second root domain in openldap. want accomplish through command line. understand have edit slapd.conf file , add following second domain:

database    bdb suffix      "dc=newdomain,dc=com" rootdn      "cn=manager,dc=mydomain,dc=com" rootpw          secret directory   <path_to_preexisting_directory> 

after this, restarted server, domain doesn't seem added neither can connect nor can execute commands such ldapadd, ldapsearch etc.

what can create domain?

according openldap quick start guide #8 don't have change ldap.conf, have create auxilliary .ldif-file , perform ldapadd upon it:

#example .ldif-file 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, example, test.ldif , use command add database:

ldapadd -x -d "cn=admin,dc=example,dc=com" -w <password> -h ldap:// -f test.ldif 

cn=admin can not work you, depends on how did called user

-w <password> need specify password, without <>

i guess want know, configuring openldap slapd.conf deprecated , not supported. using new method ldif-files , cn=config has many pros, example don't need restart server after changing system databases.

using bdb , hdb undesirable, use oracle berkleydb , openldap wants go further own db-backend, mdb.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -