- 论坛徽章:
- 0
|
为什么
ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f ../etc/example.ldif
时返回如下错误呀
[root@localhost bin]# ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f ../etc/example.ldif
Enter LDAP Password:
adding new entry "dc=example, dc=com "
ldapadd: update failed: dc=example, dc=com
ldap_add: Invalid syntax (21)
additional info: objectclass: value #0 invalid per syntax
//以下是slapd返回的信息
conn=9 fd=12 ACCEPT from IP=127.0.0.1:1591 (IP=0.0.0.0:389)
conn=9 op=0 BIND dn="cn=Manager,dc=example,dc=com" method=128
conn=9 op=0 BIND dn="cn=Manager,dc=example,dc=com" mech=SIMPLE ssf=0
conn=9 op=0 RESULT tag=97 err=0 text=
conn=9 op=1 ADD dn="dc=example,dc=com"
conn=9 op=1 RESULT tag=105 err=21 text=objectclass: value #0 invalid per syntax
conn=9 op=2 UNBIND
conn=9 fd=12 closed
//我的slapd.conf如下
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd( and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw secret
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /usr/local/var/openldap-data
# Indices to maintain
index objectClass eq
//我的example.ldif如下
dn: dc=example, dc=com
objectclass: dcObject
objectclass: organization
o: Example Company
dc: example
dn: cn=Manager, dc=example, dc=com
objectclass: person
cn: example
sn: example |
|