1> 通过unix 命令行来修改LDAP数据
ldapGrpModify.ldif内容:
dn: cn=part1,cn=portal,cn=Groups,dc=company,dc=net
uniquemember: cn=111111,cn=users,dc=company,dc=net
uniquemember: cn=222222,cn=users,dc=company,dc=net
命令格式:
ldapmodify -h ip: port -D cn=UserId -w passwd -v -f ldapGrpModify.ldif
其中:part1是我建的一个group ,里面有一个attribute (uniquemember)
通过上面的命令,可以增加2条记录: cn=111111,cn=users,dc=company,dc=net和cn=222222,cn=users,dc=company,dc=net
如果我要删除其中的一条记录,ldif的内容应该怎么写呢?命令格式是什么样的?
(例:只删除这cn=111111,cn=users,dc=company,dc=net)
2> 如果通过ODM来直接增加删除 uniquemember的内容,又出错,详细如附件.
[LDAP:error code 19 - Admin Domain restricts modification of Attribute:modifytimestamp.]
oracle.ldap.admin.common.SaveChangeException:修改 失败.
--------------------------------------------------------------------------
查找了一些资料,LDAP方面介绍的很少。 有没有经历过这个问题的,帮助分析一下,谢谢啊!
--------------------------------------------------------------------------
测试了一下:replace是把整个uniquemember的内容替换掉
If the file /tmp/entrymods exists and has the following contents:
dn: cn=Modify Me, o=University of Higher Learning, c=US
changetype: modify
replace: mail
mail:
modme@student.of.life.edu[/email]
-
add: title
title: Grand Poobah
-
add: jpegPhoto
jpegPhoto:< file:///tmp/modme.jpeg
-
delete: description
-
The command ldapmodify -b -r -f /tmp/entrymods will do the following:
Replace the contents of the Modify Me entrys mail attribute with the value [email=modme@student.of.life.edu]modme@student.of.life.edu.
Add a title of Grand Poobah.
Add the contents of the file /tmp/modme.jpeg as a jpegPhoto.
Completely remove the description attribute.
[
本帖最后由 hinger 于 2008-5-21 11:25 编辑 ]