加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-15 18:34:47 所属栏目:安全 来源:网络整理
导读:这是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 * noneolcAccess: {1}to dn.base="" by * readolcAccess: {2}to * by sel
这是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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读