vim ro_access.ldif

vim ro_access.ldif

Ich möchte eine ACL für eine Unterorganisation in meinem OpenLDAP hinzufügen.

Dies ist ihre ACL-Dokumentation: https://www.openldap.org/doc/admin24/access-control.html

Ich verwende es, ldapmodifyum die LDAP-Datenbank auf einer laufenden OpenLDAP-Instanz zu aktualisieren.

Dies ist dasldifDatei, die ich importiert habe:

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

ich erwarte

  • muss cn=workstation,ou=applications,dc=example,dc=comKinder unter lesen könnenou=users,dc=example,dc=com
  • muss authdas vorhergehende Standardverhalten aufweisen.
  • muss anonymousdas vorhergehende Standardverhalten aufweisen.

Ich habe

  • ldapwhoamiarbeiten mitcn=workstation,ou=applications,dc=example,dc=com
  • ldapsearchfehlgeschlagenes Rückgabeergebnis uid=someone,ou=users,dc=example,dc=commitcn=workstation,ou=applications,dc=example,dc=com

Bearbeiten

Ich habe versucht, olcAccess {1}durch {2}und {2}durch zu ersetzen {1}.

Dies ist die vollständig ersetzte ACL und sie funktioniert auch nicht:

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 

Irgendeine Idee, warum?

Antwort1

by anonymous auth by * noneVersuchen Sie , am Ende Ihrer ACL-Direktive Folgendes hinzuzufügen :

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

verwandte Informationen