Chinaunix

标题: 研究数天未果,特来请教 [打印本页]

作者: anthonyfeng    时间: 2006-02-08 18:25
标题: 研究数天未果,特来请教
在rhel 4 下,按http://www.openldap.org/doc/admin23/quickstart.html 操作

已经操作到10.Add initial entries to your directory.

[root@localhost openldap]# ldapadd -x -D "cn=Manager,dc=my-domain,dc=com" -W -f example.ldif
Enter LDAP Password:
adding new entry "dc=my-domain,dc=com"
ldap_add: Naming violation (64)
        additional info: value of naming attribute 'dc' is not present in entry

请问以上操作结果提示正常吗?
作者: py    时间: 2006-02-09 16:19
在slapd.conf中把基本的schema都include进来

把example.ldif的内容贴出来
作者: anthonyfeng    时间: 2006-02-09 19:59
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema
database        bdb
suffix          "dc=test,dc=idv.tw"
rootdn          "cn=admin,dc=test,dc=idv.tw"

# cat BDN.ldif
dn: dc=test,dc=idv.tw
objectClass: top

# ldapadd -x -W -D"cn=admin,dc=test,dc=idv.tw" -f BDN.ldif
Enter LDAP Password:
adding new entry "dc=test,dc=idv.tw"
ldap_add: Object class violation (65)
        additional info: no structural object class provided


我使用的是rhel 4,谢谢!

[ 本帖最后由 anthonyfeng 于 2006-2-9 20:01 编辑 ]
作者: abanger    时间: 2006-02-09 23:59
# cat BDN.ldif
dn: dc=test,dc=idv.tw
objectClass: top
重复了,这个工作不用做了,在slapd.conf上已有了,你只要再继续往下做就对了
作者: pcwu_yhwu    时间: 2006-02-10 08:49
标题: 回复 1楼 anthonyfeng 的帖子
bdn.ldif problem, modify it is ok.
作者: yj11    时间: 2006-02-10 11:02
原帖由 anthonyfeng 于 2006-2-8 18:25 发表
在rhel 4 下,按http://www.openldap.org/doc/admin23/quickstart.html 操作

已经操作到10.Add initial entries to your directory.

[root@localhost openldap]# ldapadd -x -D "cn=Manag ...


提示已经很明确告诉你问题出在哪了.缺少dc在你的entry当中
value of naming attribute 'dc' is not present in entry
作者: anthonyfeng    时间: 2006-02-10 18:25
我是按此文章操作的:"LDAP初體驗:用LDAP當通訊錄"
http://phorum.study-area.org/vie ... B7%ED%B3q%B0T%BF%FD

执行
ldapadd -x -W -D"cn=admin,dc=test,dc=idv.tw" -f /etc/openldap/ldif/BDN.ldif
不成功
执行
ldapadd -x -W -D"cn=admin,dc=test,dc=idv.tw" -f /etc/openldap/ldif/group.ldif
提示Enter LDAP Password:
adding new entry "ou=people,dc=test,dc=idv.tw"
ldap_add: No such object (32)

想不到入门这么不顺利,请指点一下。



原帖由 abanger 于 2006-2-9 23:59 发表
# cat BDN.ldif
dn: dc=test,dc=idv.tw
objectClass: top
重复了,这个工作不用做了,在slapd.conf上已有了,你只要再继续往下做就对了





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2