You can add an ACI by specifying the ACI in an LDIF file and then applying the LDIF file with the ldapmodify command. The LDIF file must contain one or more aci attributes, each of which is composed of the aci: prefix followed by the ACI specification. For more information, see ACI Syntax in Sun OpenDS Standard Edition 2.2 Architectural Reference.
The following sample LDIF file (aci.ldif) adds an ACI that grants a particular user (csmith) full access rights to the directory:
dn: ou=people,dc=example,dc=com changetype: modify add: aci aci: (targetattr="*")(version 3.0; acl "give csmith full rights"; allow(all) userdn = "ldap:///uid=csmith,ou=People,dc=example,dc=com";)
The following command applies the ACI contained in the aci.ldif file to the directory:
$ ldapmodify -h localhost -p 1389 -D "cn=Directory Manager" -w password \ --filename aci.ldif Processing MODIFY request for ou=people,dc=example,dc=com MODIFY operation successful for DN ou=people,dc=example,dc=com