Where is the dc=example,dc=com ldap dit?

I am following the server guide for ubuntu 14.04 LTS and I am trying to setup ldap but I have a problem. There is supposed to be a dit named dc=example,dc=com but when I type ldapsearch -x -LLL -H ldap:/// -b dc=example,dc=com dn I get No such object (32) instead of

dn: dc=example,dc=com
dn: cn=admin,dc=example,dc=com

like the guide says i should.

Now after making the add_content.ldif file with the contents listed in the guide and use the command ldapadd -x -D cn=admin,dc=example,dc=com -W -f add_content.ldif with the password I set during installation I get ldap_bind: Invalid credentials (49).

So i guess there is no dc=example,dc=com ldap dit so where is it or how do I make it so i can follow the guide?

4

1 Answer

I just checked slapd installation on a VM, and it does not create an example DN by default (which is a good thing):

$ ls /etc/ldap/slapd.d
cn=config cn=config.ldif 

You can either add entries all the way from a base DN, or run sudo dpkg-reconfigure slapd, in which case, you will be greeted with these choices:

  • Pick No:Do not skip slapd configuration
  • Use an FQDN (such as example.com, my.personal.site.org, etc.):Enter an FQDNDo NOT enter dc=example,dc=com here.
  • Pick some name (e.g., "An example site", "My personal site", etc.):Enter your domain's pretty name
  • When asked for admin password, you're resetting the password to cn=admin,cn=config. So it's not necessary that you use the password you set while installing slapd.
  • Use HDB unless you know otherwise. If you don't know what this is, HDB it is.Pick HDB
  • Since we don't have a database, pick yes.Purge it all
  • Same here. Move it.Move everything
  • Do not allow v2 unless you know otherwise. If you don't know what this is, No it is.LDAPv3 only

A base DN for whatever FQDN you entered will be created.

You can repeated sudo dpkg-reconfigure slapd to reset slapd and start over from scratch at any time.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like