How to resolve ldapadd ldap_bind: invalid credentials (49)

Source: Internet
Author: User
Tags ldapsearch openldap

The following content is reproduced from http://www.ezylinux.com/en/red-hat-6-how-to-fixes-ldapadd-ldap_bind-invalid-credentials-49/

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 shoshould to know that/etc/OpenLDAP/slapd. d/is directory for store the new configuration file. 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.

Delete all files in directory/etc/OpenLDAP/slapd. d/with the command
 
[Root @ ezylinux ~] # Rm-RF/etc/OpenLDAP/slapd. d /*

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

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

Finally, delete or rename files. slapd. conf
After all the steps you can start the slapd service and then try to use ldapsearch and ldapadd again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.