
OpenLDAP의 하위 조직에 대한 ACL을 추가하고 싶습니다.
다음은 ACL 문서입니다. https://www.openldap.org/doc/admin24/access-control.html
ldapmodify
실행 중인 OpenLDAP 인스턴스에서 ldap db를 업데이트하는 데 사용하고 있습니다 .
이것이ldif내가 가져온 파일:
vim ro_access.ldif
dn: olcDatabase={1}mdb,cn=config
changetype: modify
add: olcAccess
olcAccess: {2}to dn.children="ou=users,dc=example,dc=com" by dn.exact="cn=workstation,ou=applications,dc=example,dc=com" read
나는 기대
cn=workstation,ou=applications,dc=example,dc=com
아래의 아이들을 읽을 수 있어야 합니다ou=users,dc=example,dc=com
auth
이전의 기본 동작이 있어야 합니다 .anonymous
이전의 기본 동작이 있어야 합니다 .
나는 가지고있다
ldapwhoami
함께 일하다cn=workstation,ou=applications,dc=example,dc=com
ldapsearch
결과를 반환하지 못했습니다uid=someone,ou=users,dc=example,dc=com
.cn=workstation,ou=applications,dc=example,dc=com
편집하다
olcAccess
{1}
나는 와 {2}
으로 교체 {2}
하려고 노력했습니다 {1}
.
이는 완전히 교체된 ACL이며 작동하지 않습니다.
dn: olcDatabase={1}mdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to attrs=userPassword,shadowLastChange by self write by dn="cn
=admin,dc=example,dc=com" write by dn="cn=ropw,dc=example,dc=co
m" read by anonymous auth by * none
olcaccess: {1}to dn.children="ou=users,dc=example,dc=com" by dn
.exact="cn=workstation,ou=applications,dc=example,dc=com" read
olcaccess: {2}to * by self write by dn="cn=admin,dc=example,dc=com" write
by dn="cn=ro,dc=example,dc=com" read by dn="cn=ropw,dc=exam
ple,dc=com" read by * none
이유가 무엇입니까?
답변1
by anonymous auth by * none
ACL 지시문 끝에 다음을 추가해 보세요 .
olcAccess: {1}to dn.children="ou=users,dc=example,dc=com" by dn
.exact="cn=workstation,ou=applications,dc=example,dc=com" read
by anonymous auth by * none