免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3575 | 回复: 12
打印 上一主题 下一主题

[ldap] ldap的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-07-13 22:13 |只看该作者 |倒序浏览
slapd.conf配置文件中的index 到底是怎么回事啊。我一点都没看明白。
恳请指教。

论坛徽章:
0
2 [报告]
发表于 2004-07-18 22:49 |只看该作者

ldap的问题

另外还有一个事情,我用客户端连接到ldap服务器的时候总是可以正常连接上去,显示为Successfully connected to 202.115.*.*
但是,却总是会出现这个错误:[ERROR 32] No such object
我查找的对象类是bjectClass=*,始终没明白问题出在什么地方。
恳请赐教。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
3 [报告]
发表于 2004-07-18 23:41 |只看该作者

ldap的问题

是不是客户端的问题?你在命令行下查找正常吗?

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
4 [报告]
发表于 2004-07-18 23:55 |只看该作者

ldap的问题

原帖由 "rockins" 发表:
slapd.conf配置文件中的index 到底是怎么回事啊。我一点都没看明白。
恳请指教。


This directive specifies the indices to maintain for the given attribute. If only an <attrlist>; is given, the default indices are maintained.

Example:

        index default pres,eq
        index uid
        index cn,sn pres,eq,sub
        index objectClass eq

The first line sets the default set of indices to maintain to present and equality. The second line causes the default (pres,eq) set of indices to be maintained for the uid attribute type. The third line causes present, equality, and substring indices to be maintained for cn and sn attribute types. The fourth line causes an equality index for the objectClass attribute type.

By default, no indices are maintained. It is generally advised that minimally an equality index upon objectClass be maintained.

        index objectClass eq

其实index不是个很有用的功能(个人意见)

论坛徽章:
0
5 [报告]
发表于 2004-07-19 21:44 |只看该作者

ldap的问题

py兄,这就是openldap的adminguide嘛,我就是没看懂这个。
不过你说的用ldapsearch我倒还没试过,恕小弟愚昧。这就试。

论坛徽章:
0
6 [报告]
发表于 2004-07-20 22:24 |只看该作者

ldap的问题

我用的客户端是Softerra LDAP Browser
能够获取到顶层dn,但是就是会出现invalid objectClass 错误。
我在服务器的命令行下用ldapsearch也会出现这个invalid objectClass 错误。
一直没有能够把这个问题解决。哪位大哥能够帮帮小弟,不甚感激。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
7 [报告]
发表于 2004-07-20 22:48 |只看该作者

ldap的问题

说具体点,把你的ldif文件贴出来,还有你ldapsearch的内容也贴出来

论坛徽章:
0
8 [报告]
发表于 2004-07-21 17:49 |只看该作者

ldap的问题

slapd.conf 文件如下:

#global
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/nis.schema

argsfile /usr/local/var/run/slapd.args
pidfile  /usr/local/var/run/slapd.pid

access to * by * read

#backend
backend ldbm

#ldbm
database ldbm
suffix "dc=netunion,dc=org"
directory /usr/local/var/openldap-data
rootdn "cn=root,dc=netunion,dc=org"
rootpw admin
index objectClass eq

ldif文件如下:

# department
dn=network,dc=netunion,dc=org
o:network
objectclassrganization

dn=developer,dc=netunion,dc=org
o:developer
objectclassrganization

dn=secretary,dc=netunion,dc=org
o:secretary
objectclassrganization

# member
dn:cn=ShenShiHai,o=network,dc=netunion,dc=org
sn:0001
cn:ShenShiHai
objectclass:person

dn:cn=XiaoPai,o=developer,dc=netunion,dc=org
sn:0002
cn:XiaoPai
objectclass:person

dn:cn=LiuChuan,o=secretary,dc=netunion,dc=org
sn:0003
cn:LiuChuan
objectclass:person

ldapsearch的结果是:

ldap_create
ldap_url_parse_ext(ldap://localhost:389)
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 3 tm: -1 async: 0
ldap_ndelay_on: 3
ldap_is_sock_ready: 3
ldap_ndelay_off: 3
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 14 bytes to sd 3
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: localhost  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Wed Jul 21 17:42:08 2004

** Outstanding Requests:
* msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ldap_read: message type bind msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
read1msg:  0 new referrals
read1msg:  mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>;, res_matched: <>;
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (}) ber:
ldap_msgfree
# extended LDIF
#
# LDAPv3
# base <>; with scope sub
# filter: (objectclass=*)
# requesting: ALL
#

ldap_search_ext
put_filter: "(objectclass=*)"
put_filter: simple
put_simple_filter: "objectclass=*"
ldap_send_initial_request
ldap_send_server_request
ber_flush: 39 bytes to sd 3
ldap_result msgid -1
ldap_chkResponseList for msgid=-1, all=0
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid -1
wait4msg continue, msgid -1, all 0
** Connections:
* host: localhost  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Wed Jul 21 17:42:08 2004

** Outstanding Requests:
* msgid 2,  origid 2, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=-1, all=0
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid -1, all 0
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ldap_read: message type search-result msgid 2, original id 2
ber_scanf fmt ({iaa) ber:
read1msg:  0 new referrals
read1msg:  mark request completed, id = 2
request 2 done
res_errno: 0, res_error: <>;, res_matched: <>;
ldap_free_request (origid 2, msgid 2)
ldap_free_connection
ldap_free_connection: refcnt 1
# search result
search: 2
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (}) ber:
ldap_err2string
result: 32 No such object
ldap_msgfree

# numResponses: 1
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 3
ldap_free_connection: actually freed

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
9 [报告]
发表于 2004-07-21 21:33 |只看该作者

ldap的问题

我这里没问题,ldapsearch是这样的ldapsearch -x -D "cn=root,dc=netunion,dc=org" -w solaris -b "dc=netunion,dc=org" '(objectclass=*)'

论坛徽章:
0
10 [报告]
发表于 2004-07-21 22:00 |只看该作者

ldap的问题

我完全晕了,我用的是debian linux,死活不对头。用的是一样的命令。
思考ing.......
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP