How to resolve ldapadd ldap_bind: Invalid credentials (49)

以下内容转载自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 should 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.

转载于:https://www.cnblogs.com/google4y/archive/2011/07/24/2115318.html

你可能感兴趣的:(How to resolve ldapadd ldap_bind: Invalid credentials (49))