openldap 2.3和2.4之间的区别

openldap 2.3和2.4之间有区别 – 特别是使用ldapmodify …

If no "changetype:" line is present, the default is "add" if the -a flag is set (or if the program was invoked as ldapadd) and "modify" otherwise. If changetype is "modify" and no "add:", "replace:", or "delete:" lines appear, the default is "replace" for ldapmodify(1) and "add" for ldapadd(1). 

有没有人有任何想法如何使2.4版本的ldapmodify采取同样的方式? 现在我的脚本告诉我:

 ldapmodify: modify operation type is missing at line xxxx 

我试图添加行“changetype:修改”后,我试图导入文件中的每个dn:项,但是这并没有解决这个问题。

那么,在这个愚蠢的家伙这里可以find我失踪的人吗?

ldif格式示例:

 # inactive, group, mydomain.net dn: cn=inactive,ou=group,dc=mydomain,dc=net cn: inactive gidNumber: 9999 objectClass: top objectClass: posixGroup 

LDAP 2.3至less只需要改变属性:

 dn: uid=HOST$,ou=Computers,dc=example,dc=edu changetype: modify sambaSID: S-1-5-21-3806935310-923960185-3344722049-877 

版本2.4需要额外的属性来修改:

 dn: uid=HOST$,ou=Computers,dc=example,dc=edu changetype: modify replace: sambaSID sambaSID: S-1-5-21-3806935310-923960185-3344722049-877 

在最后一个例子中查看stringreplace: sambaSID 。 在我的Debian 6上,首先LDIF出现错误

 # ldapmodify -v -xWD cn=root,dc=ecample,dc=edu -f wsmodify.ldif ldap_initialize( <DEFAULT> ) Enter LDAP Password: ldapmodify: modify operation type is missing at line 3, entry "uid=HOST$,ou=Computers,dc=example,dc=edu" 

第二个LDIF例子工作正常:

 # ldapmodify -v -xWD cn=root,dc=example,dc=edu -f wsmodify.ldif ldap_initialize( <DEFAULT> ) Enter LDAP Password: replace sambaSID: S-1-5-21-3806935310-923960185-3344722049-877 modifying entry "uid=HOST$,ou=Computers,dc=example,dc=edu" modify complete 

有关ldapaddldapmodify以及http://www.zytrax.com/books/ldap/ch8/index.html#changetype的详细信息,请参阅http://www.zytrax.com/books/ldap/ch14/了解有关其他属性&#x3002;

最好的祝福。