fixed change acl

This commit is contained in:
Gilles Mouchet 2025-01-01 17:39:05 +01:00
parent 9516e34a4f
commit bd140d61b6

View File

@ -158,14 +158,13 @@ memberuid: sarah.mouchet
EOF EOF
echo "change ACL" echo "change ACL"
docker exec ldap /bin/bash -c 'ldapmodify -H ldapi:/// -Y EXTERNAL << EOF docker exec openldap /bin/bash -c 'ldapmodify -H ldapi:/// -Y EXTERNAL << EOF
dn: olcDatabase={2}mdb,cn=config dn: olcDatabase={2}mdb,cn=config
changetype: modify changetype: modify
replace: olcAccess replace: olcAccess
olcAccess: to attrs=userPassword olcAccess: to attrs=userPassword
by self write by self write
by anonymous auth by anonymous auth
by dn.base="cn=admin,$LDAP_ROOT" write
by dn.base="cn=Admin LDAP,ou=people,$LDAP_ROOT" write by dn.base="cn=Admin LDAP,ou=people,$LDAP_ROOT" write
by dn.base="cn=Access LDAP,ou=people,$LDAP_ROOT" read by dn.base="cn=Access LDAP,ou=people,$LDAP_ROOT" read
by anonymous auth by anonymous auth
@ -179,6 +178,15 @@ olcAccess: to *
by * none by * none
EOF EOF
' '
docker exec openldap /bin/bash -c 'ldapmodify -H ldapi:/// -Y EXTERNAL << EOF
dn: olcDatabase={1}monitor,cn=config
changetype: modify
add: olcAccess
#replace: olcAccess
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=externalcn=auth" read
by dn.base="cn=Admin LDAP,ou=people,$LDAP_ROOT" read by * none
EOF
'
#echo "Change organization name" #echo "Change organization name"
#ldapmodify -H $LDAP_SRV -w $LDAP_ADMIN_PASSWORD -D $LDAP_ADMIN_DN << EOF #ldapmodify -H $LDAP_SRV -w $LDAP_ADMIN_PASSWORD -D $LDAP_ADMIN_DN << EOF