summaryrefslogtreecommitdiff
path: root/standalone-ldap/04-add-primary-domain.sh
blob: 32aaefdf75885777aa968de314f0ce23b2e29f5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

 . ./settings.sh

(
    echo "dn: associateddomain=${domain},cn=kolab,cn=config"
    echo "objectclass: top"
    echo "objectclass: domainrelatedobject"
    echo "associateddomain: ${domain}"
    echo "aci: (targetattr = \"*\") (version 3.0;acl \"Read Access for ${domain} Users\";allow (read,compare,search)(userdn = \"ldap:///${rootdn}??sub?(objectclass=*)\");)"
    echo ""
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"