debian – 如何正确ldapmodify替换olcAccess线?

前端之家收集整理的这篇文章主要介绍了debian – 如何正确ldapmodify替换olcAccess线?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
这是olcD​​atabase = {1} hdb.ldif的一部分
olcAccess: {0}to attrs=userPassword,shadowLastChange
 by self write
 by anonymous auth
 by dn="cn=admin,dc=somesite,dc=com" write
 by * none
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to *
 by self write
 by dn="cn=admin,dc=com" write
 by * read

我想通过dn =“cn = anotheruser,ou = Users,dc = somesite,dc = com”追加到{0}和{2}行.

在销毁我的LDAP服务器之前,以下LDIF是否正确?

dn: olcDatabase{1}hdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to attrs=userPassword,shadowLastChange
        by dn="cn=admin,dc=com" write
        by dn="uid=anotheruser,ou=Users,dc=com" write
        by anonymous auth
        by self write
        by * none
olcAccess: {2}to *
 by self write
 by dn="cn=admin,dc=com" write
 by dn="cn=anotheruser,dc=com" write
 by * read

使用:ldapmodify -Y EXTERNAL -H ldapi:/// -f ./changes.ldif

我担心的是:

>有3个olcAccess:行,我没有包含{1}行
在提交ldif更改后它仍然存在
>是替换:olcAccess线是否正确?

这个ldif为我工作,以前的命令
dn: olcDatabase{1}hdb,dc=com" write
        by anonymous auth
        by self write
        by * none
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to *
 by self write
 by dn="cn=admin,dc=com" write
 by * read
原文链接:https://www.f2er.com/bash/385657.html

猜你在找的Bash相关文章