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.

No related posts.

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

9 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.

Leave a Reply

*