summaryrefslogtreecommitdiff
path: root/standalone-ldap/04-add-primary-domain.sh
diff options
context:
space:
mode:
Diffstat (limited to 'standalone-ldap/04-add-primary-domain.sh')
-rwxr-xr-xstandalone-ldap/04-add-primary-domain.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/standalone-ldap/04-add-primary-domain.sh b/standalone-ldap/04-add-primary-domain.sh
new file mode 100755
index 0000000..32aaefd
--- /dev/null
+++ b/standalone-ldap/04-add-primary-domain.sh
@@ -0,0 +1,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}"