禁止未经身份验证的绑定(无密码的DN)

时间:2013-12-25 20:02:22

标签: linux ldap openldap oracle-enterprise-linux

我正在尝试在OEL 5.7上配置openldap,我收到此错误:

ldapadd -a -X -w -D'cn = ldapadmin,dc = oraia,dc = com'-f initialize_ldap.ldif

ldap_bind:DSA不愿意执行 ldap_bind:附加信息:不允许未经身份验证的绑定(没有密码的DN)

这是我的.ldif文件

dn: dc=oraia,dc=com
objectclass: dcObject
objectclass: organization
o: Oraia LDAP Server for Net Service Names
dc: oraia

dn: cn=ldapadmin,dc=oraia,dc=com
objectclass: organizationalRole
cn: ldapadmin

这是我的slapd.conf文件

# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema

pidfile         /var/run/openldap/slapd.pid
argsfile        /var/run/openldap/slapd.args

database        bdb
suffix          "dc=oraia,dc=com"
rootdn          "cn=ldapadmin,dc=oraia,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw          secret
# rootpw                {crypt}ijFYNcSNctBYg
#rootpw {SSHA}rW/GYmrcz6/CZfp7vMW4Kp+wYWK9rrIk
#rootpw {CRYPT}ld1saKGO4zPbQ

directory       /var/lib/ldap

# Indices to maintain for this database
index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub

我已经在互联网上尝试了所有的rootpw解决方案,但它没有工作抛出与上述相同的错误。

1 个答案:

答案 0 :(得分:1)

试试ldapadd -a -x -w secret -D 'cn=ldapadmin,dc=oraia,dc=com' -f initialize_ldap.ldif-X需要您不需要的选项,并且您需要提供-w的密码。请注意secret来自slapd.conf;如果您在发布时更改了它,请使用真实的。