summaryrefslogtreecommitdiff
path: root/hosted-kolab/05-add-management-domain.sh
blob: 16efa77332f0f72a6b229afe24c4713edea8ca69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

 . ./settings.sh
(
    echo "dn: associateddomain=${domain},${domain_base_dn}"
    echo "aci: (targetattr = \"*\")(version 3.0;acl \"Deny Rest\";deny (all)(userdn != \"ldap:///uid=kolab-service,ou=Special Users,${rootdn} || ldap:///${rootdn}??sub?(objectclass=*)\");)"
    echo "aci: (targetattr = \"*\")(version 3.0;acl \"Deny Hosted Kolab\";deny (all)(userdn = \"ldap:///uid=hosted-kolab-service,ou=Special Users,${rootdn}\");)"
    echo "inetDomainStatus: active"
    echo "inetDomainBaseDN: dc=example,dc=org"
    echo "objectClass: top"
    echo "objectClass: domainrelatedobject"
    echo "objectClass: inetdomain"
    echo "associatedDomain: ${domain}"
    echo ""
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"