summaryrefslogtreecommitdiff
path: root/hosted-kolab/04-add-ou-Domains.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hosted-kolab/04-add-ou-Domains.sh')
-rwxr-xr-xhosted-kolab/04-add-ou-Domains.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/hosted-kolab/04-add-ou-Domains.sh b/hosted-kolab/04-add-ou-Domains.sh
new file mode 100755
index 0000000..8415711
--- /dev/null
+++ b/hosted-kolab/04-add-ou-Domains.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+ . ./settings.sh
+(
+ echo "dn: ou=Domains,${rootdn}"
+ echo "ou: Domains"
+ echo "objectClass: top"
+ echo "objectClass: organizationalunit"
+ echo "aci: (target = \"ldap:///${domain_base_dn}\")(targetattr=\"objectclass || aci || inetdomainstatus || inetdomainbasedn || associateddomain\") (version 3.0;acl \"Allow Domain Registration\"; allow (add)(userdn = \"ldap:///uid=hosted-kolab-service,ou=Special Users,${rootdn}\");)"
+ echo "aci: (targetattr=\"objectclass || aci || inetdomainstatus || inetdomainbasedn || associateddomain\") (version 3.0;acl \"Allow Search\"; allow (search,read,compare)(userdn = \"ldap:///anyone\");)"
+ echo ""
+) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"