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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值