Red Hat 6: How to resolve ldapadd ldap_bind: Invalid credentials (49)

Red Hat Enterprise 6
Openldap on Red Hat Enterprise 6 has changed the new configuration file, which is a configuration tree style. If you has configured the Openldap in RHEL5 you may be confused when you completely configured for the slapd.conf and start ldap service, then use ldapadd or ldapsearch command for query data but it shown error “ldapadd ldap_bind: Invalid credentials (49)“. So, in this article I will give the way for solve the problem.

Before walkthrough on the configuration step you should to know that /etc/openldap/slapd.d/ is directory for store the new configuration files. By default it has provided example configuration on this directory. If you worry about how to configure a new ldap configuration style, you should relaxed and walk-through this step below for reach the new configuration style.

  1. Delete all files in directory /etc/openldap/slapd.d/ with the command
    [root@ezylinux ~]# rm -rf /etc/openldap/slapd.d/*
  2. Run slaptest for test the configuration file and create new configuration in directory /etc/openldap/slapd.d/.
    [root@ezylinux ~]# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
  3. Set permissions for a new configuration file.
    [root@ezylinux ~]# chown -R ldap:ldap /etc/openldap/slapd.d
    [root@ezylinux ~]# chmod -R 000 /etc/openldap/slapd.d
    [root@ezylinux ~]# chmod -R u+rwX /etc/openldap/slapd.d
  4. Finally, delete or rename slapd.conf.

After all the steps you can start the slapd service and then try to use ldapsearch and ldapadd again.

You can leave a response, or trackback from your own site.

12 Responses to “Red Hat 6: How to resolve ldapadd ldap_bind: Invalid credentials (49)”

  1. selcuk yazar says:

    you are the god

  2. mohit sah says:

    It works for me ………..

    thanks

  3. Salemme F. says:

    Thanks o lot, very helpful, I was “rambling” aroud and this post saved me.

  4. chenjintao says:

    a great appreciation from a Chinese!!!

  5. Shantanu says:

    It’s really helpful. Thanks

  6. elango says:

    thnks bro……….
    in simple 4 steps, cured my headache….!

  7. silver_kinight says:

    But this not help to me .
    I still see this message:
    ldap_bind: Invalid credentials (49)

  8. manoj says:

    it’s usefull thanks dear….

  9. Cristian says:

    Thanks man, you save me. great solution.

  10. julio says:

    mmm a mi no me ha quedado y creo saber cual es un de mis problema despues de haber ejecutado este comando
    rm -rf /etc/openldap/slapd.d/*
    asta ahi todo bien pero despues al ejecutar el siguiente paso me manda un error
    slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
    could not stat config file “/etc/openldap/schema/intorgperson.schema”: No such file or directory (2)
    slaptest: bad configuration directory!

    • admin says:

      same issue , anyone can help us to resolve the issue in rhel6.1
      rm -rf /etc/openldap/slapd.d/*
      asta ahi todo bien pero despues al ejecutar el siguiente paso me manda un error
      slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
      could not stat config file “/etc/openldap/schema/intorgperson.schema”: No such file or directory (2)
      slaptest: bad configuration directory!

  11. merchant cash advance says:

    Many thanks for the actual excellent writeup. The item in reality was some sort of fun account this. Look difficult to be able to additional launched flexible from you finding out! Nonetheless, precisely how can most of us be in contact?

Leave a Reply

*