免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: gig2600
打印 上一主题 下一主题

[ldap] 关于slapcat与slapadd导入导出的问题。 [复制链接]

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

关于slapcat与slapadd导入导出的问题。

ldapadd是在线使用的,slapadd可以在openldap没有运行的情况下使用。在openldap2.0.x和早期版本不支持slapadd在openldap运行的时候使用。不过后来的版本就都兼容了。

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

关于slapcat与slapadd导入导出的问题。

原帖由 "shenmue71" 发表:
ldap_sasl_interactive_bind_s: No such object
加-x 参数应该就可以了

-x参数是可选的,早期的ldapadd等客户端工具不支持-x参数

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

关于slapcat与slapadd导入导出的问题。

原帖由 "gig2600" 发表:
请问在执行ldapadd动作的时候,是否需要先手工添加一条root用户的信息?
这个是加了x参数的错误提示信息
ldap_add: Constraint violation
        additional info: creatorsName: no user modification allowed

这样使用ldapadd:
ldapadd -x -D "cn=Manager,dc=example,dc=com,dc=cn" -w secret -f aa.ldif

论坛徽章:
0
14 [报告]
发表于 2004-09-13 17:06 |只看该作者

关于slapcat与slapadd导入导出的问题。

被这个openldap弄的实在太郁闷了。
我的安装方式 系统rh7.3
1. rpm方式安装
openldap-devel-2.0.27-2.7.3
openldap-servers-2.0.27-2.7.3
openldap-clients-2.0.27-2.7.3
openldap-2.0.27-2.7.3
2.修改slapd.conf文件 主要是这么几个参数。
database        ldbm
suffix          "o=a.com
suffix          "o=b.com"
rootdn          "cn=root,o=a.com"
rootpw          secret
3.运行slapd程序。netstat -nlp已经显示开启了389口。
4.ldapadd命令。

是否我在步骤3和4之间缺少了某些关键步骤,所以导致无法导入ldif文件呢?

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

关于slapcat与slapadd导入导出的问题。

手工编译

论坛徽章:
0
16 [报告]
发表于 2004-09-13 19:46 |只看该作者

关于slapcat与slapadd导入导出的问题。

rpm包安装不可以吗?
应该差不多的吧。

论坛徽章:
0
17 [报告]
发表于 2004-09-13 20:00 |只看该作者

关于slapcat与slapadd导入导出的问题。

源码编译和rpm包的安装应该差不多的吧。
请问我在做第3 和第4步之间,还有什么其他重要的步骤吗?
比如手工添加o=aa.com o=bb.com 和 root信息。
这些信息应该也能从ldif文件中导入的吧。

论坛徽章:
0
18 [报告]
发表于 2004-09-14 12:14 |只看该作者

关于slapcat与slapadd导入导出的问题。

我也遇到这个问题,搞了几天了,就是搞不定。
等找到解决方法,我来回帖。

论坛徽章:
0
19 [报告]
发表于 2004-09-14 18:23 |只看该作者

关于slapcat与slapadd导入导出的问题。

只能导一条记录会有以下几种原因:
       1. 你的文件格式不对,因为第一个条目和第二个条目之间应该有一个空行
       2.   你是windows平台下的ldif,可你却要在Linux或其它平台进行导入
       3.  条目本身非法

建议你在导入数据时加上-v选项,如果信息还不够可以再加上-d -1选项。
当然如果你还搞不定,如果不保密的话,可以把ldif文件发过来,我来帮你。lglz@21cn.com

论坛徽章:
0
20 [报告]
发表于 2004-09-15 10:16 |只看该作者

关于slapcat与slapadd导入导出的问题。

ldapadd -v -d -1 -w secret  -f /tmp/aa.ldif
ldap_initialize( <DEFAULT>; )
ldap_create
ldap_pvt_sasl_getmech
ldap_search
put_filter "(objectclass=*)"
put_filter: simple
put_simple_filter "objectclass=*"
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: 127.0.0.1
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 4 tm: -1 async: 0
ldap_ndelay_on: 4
ldap_is_sock_ready: 4
ldap_ndelay_off: 4
ldap_int_sasl_open: host=mylinux
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 64 bytes to sd 4
  0000:  30 3e 02 01 01 63 39 04  00 0a 01 00 0a 01 00 02   0>;...c9.........  
  0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object  
  0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support  
  0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms  
ldap_write: want=64, written=64
  0000:  30 3e 02 01 01 63 39 04  00 0a 01 00 0a 01 00 02   0>;...c9.........  
  0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object  
  0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support  
  0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms  
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: 127.0.0.1  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Wed Sep 15 10:11:00 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
do_ldap_select
read1msg: msgid 1, all 1
ber_get_next
ldap_read: want=1, got=1
  0000:  30                                                 0                 
ldap_read: want=1, got=1
  0000:  0c                                                 .                 
ldap_read: want=12, got=12
  0000:  02 01 01 65 07 0a 01 00  04 00 04 00               ...e........      
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x0804fff0 ptr=0x0804fff0 end=0x0804fffc len=12
  0000:  02 01 01 65 07 0a 01 00  04 00 04 00               ...e........      
ldap_read: message type search-result msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x0804fff0 ptr=0x0804fff3 end=0x0804fffc len=9
  0000:  65 07 0a 01 00 04 00 04  00                        e........         
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_dump: buf=0x0804fff0 ptr=0x0804fff3 end=0x0804fffc len=9
  0000:  65 07 0a 01 00 04 00 04  00                        e........         
ber_scanf fmt (}) ber:
ber_dump: buf=0x0804fff0 ptr=0x0804fffc end=0x0804fffc len=0

ldap_msgfree
ldap_perror
ldap_sasl_interactive_bind_s: No such object
[root@mylinux usr]#
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP