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.