Como corrigir corretamente ldapmodify substituir linhas olcAccess?

6

Isto é uma parte do olcDatabase = {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=somesite,dc=com" write
 by * read

Gostaria de acrescentar by dn="cn=anotheruser,ou=Users,dc=somesite,dc=com" write à linha {0} e {2} .

Antes de destruir meu servidor LDAP, o seguinte LDIF está correto?

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

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

Minhas preocupações são:

  • existem 3 olcAccess: linhas, não incluí a linha {1} Então, seria ainda lá depois de cometer as alterações ldif
  • a linha replace: olcAccess está correta?
por Terence 10.09.2013 / 12:22

1 resposta

6

Este ldif funcionou para mim, com o comando anterior

dn: olcDatabase{1}hdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to attrs=userPassword,shadowLastChange
        by dn="cn=admin,dc=somesite,dc=com" write
        by dn="uid=anotheruser,ou=Users,dc=somesite,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=somesite,dc=com" write
 by dn="cn=anotheruser,ou=Users,dc=somesite,dc=com" write
 by * read
    
por 11.09.2013 / 16:56