错误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