Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting started with openLdap 2.4 and am having a bit of trouble, all the examples I see seem to refer to previous versions which used the text config file slapd.conf but from what I see on discussions about v2.4, this has been deprecated.

I thought prehaps I needed to add a user, and log in as them> but when I try and run an ldapadd command, I get a prompt to enter a password:

Enter LDAP Password: 
ldap_bind: Invalid credentials (49)

Notes: I installed openldap server via yum (in fedora 15), and have installed phpldapadminbut also can try things on the command line if anyone has suggestions.

After installing and starting I get the following response from a search:

# ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts 
namingContexts: dc=my-domain,dc=com    
# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

I am glad to remove and reinstall the server if that helps, can anyone provide a link to tips that works for version 2.4 for a new setup?

share|improve this question

migrated from Oct 16 '12 at 3:59

This question came from our site for professional and enthusiast programmers.

Off-topic; belongs on Server Fault – Ex Umbris Oct 14 '12 at 21:10
thanks. didn't actually know that sister site existed. Cheers.… – Andy Dingfelder Oct 16 '12 at 20:30
up vote 0 down vote accepted

slapd.conf still works in OpenLDAP 2.4, however 'de-emphasised' it may be in the documentation.

share|improve this answer

This is old, but the question and non-answer pop up on searches a lot. First, run slappasswd to generate a password.

New password: ************
Re-enter new password: *************

Then use that value to populate your backend's config.

ldapmodify -Q -Y EXTERNAL -H ldapi:/// << E0F
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}qUoTRPwppaedqHQTgYOPYWokr3SiXjbK

Your dn may be different than the dn shown here. The config databases are found, on RHEL7, in /etc/openldap/slapd.d/cn=config. Now you can log in using the default rootdn.

If you wish, you can set your own value for the root dn:

ldapmodify -Q -Y EXTERNAL -H ldapi:/// << E0F
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=manager,dc=example,dc=com
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.