vim ro_access.ldif

vim ro_access.ldif

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 * noneACL 지시문 끝에 다음을 추가해 보세요 .

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

관련 정보