problem_ldap_bind

file.ldif的内容

(le file.ldif) dn: dc=ircoms,dc=com changetype: add objectclass: top objectclass: dcObject objectclass: organization o: ircoms dc: ircoms dn: ou=People,dc=ircoms,dc=com changetype: add objectclass: top objectclass: organizationalUnit ou: People dn: ou=Group,dc=ircoms,dc=com changetype: add objectclass: top objectclass: organizationalUnit ou: Group dn: ou=addressbook,dc=ircoms,dc=com changetype: add objectClass: top objectClass: organizationalUnit ou: addressbook 

我在这个网站上跟随了一些build议,但没有得到一些有趣的东西:

 $ usr/sbin/slapd -f /etc/openldap/slapd.conf $ ldapadd -x -D 'cn=Manager,dc=ircoms,dc=com' -f file.ldif -W Enter LDAP Password: ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) [root@bob openldap]# /etc/init.d/slapd start Starting slapd (via systemctl): [ OK ] $ ldapadd -x -D 'cn=Manager,dc=ircoms,dc=com' -f file.ldif -W Enter LDAP Password: ldap_bind: Invalid credentials (49) 

/ etc / openldap的内容

 cacerts file.ldif ldap.conf schema slapd.conf slapd.d.bak 

包含/ var / lib / ldap

 DB_CONFIG 

我仍然得到:

 Enter LDAP Password: ldap_bind: Invalid credentials (49) 

确保按照分步教程设置为您的技能级别和操作系统编写的OpenLDAP。

正如SvenW所说的,你不需要在任何地方设置密码。 如果您没有设置密码,则无法进行身份validation。 那么你的可能性是:a)允许未经身份validation的写入权限;或者b slapadd(8)slapd没有运行时使用slapadd(8)