錯誤1:
[root@openldap openldap]# ldapsearch -LLL-W -x -H ldap://etiantian.org -D "cn=admin,dc=etiantian,dc=org" -b"dc=etiantian,dc=org" "(uid=*)"
Enter LDAP Password:
ldap_bind: Invalid credentials (49)
錯誤描述:
搜選的時候,提示ldap_bind: Invalid credentials (49)
官方說是密碼錯誤
其實是版本問題
ldap2.3和2.4配置沖突問題
解決方法:
rm -rf /etc/openldap/slapd.d/*
slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/
ll /etc/openldap/slapd.d/
chown -R ldap.ldap /etc/openldap/slapd.d
/etc/init.d/slapd restart
OK搞定
錯誤2:
[root@openldap openldap]# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/
58116898 /etc/openldap/slapd.conf: line 139: <rootpw> can only be set when rootdn is under suffix
slaptest: bad configuration directory!
錯誤描述:
配置文件錯誤,是以下位置配置錯誤,注意符號
106 database bdb
107 suffix "dc=etiantian.dc=org"
108 checkpoint 1024 15
109 rootdn "cn=admin,dc=etiantian,dc=org"
解決方法:
106 database bdb
107 suffix "dc=etiantian,dc=org"
108 checkpoint 1024 15
109 rootdn "cn=admin,dc=etiantian,dc=org"
錯誤3:
[root@openldap openldap]# /etc/init.d/slapd restart
Stopping slapd: [ OK ]
Checking configuration files for slapd: [FAILED]
58116b90 ldif_read_file: Permission denied for"/etc/openldap/slapd.d/cn=config.ldif"
slaptest: bad configuration file!
錯誤描述:
重啟的時候Permission denied,說明權限不夠
解決方法:
chown -R ldap.ldap/etc/openldap/slapd.d
/etc/init.d/slapd restart
