summaryrefslogtreecommitdiff
path: root/hosted-kolab
diff options
context:
space:
mode:
authorroot <root@kolab.example.org>2015-03-11 15:05:39 (GMT)
committerroot <root@kolab.example.org>2015-03-11 15:05:39 (GMT)
commitf1645553091091d31047b08a21d316e2b6a3a13e (patch)
treefef3cfa7e9751773347a97781a74deffe1ab85c9 /hosted-kolab
parente20d983d7dbf91925d826a323544b32de2cb9667 (diff)
downloadkolab-scripts-f1645553091091d31047b08a21d316e2b6a3a13e.tar.gz
Simplify
Diffstat (limited to 'hosted-kolab')
-rwxr-xr-xhosted-kolab/05-add-hosted-domain.sh49
-rwxr-xr-xhosted-kolab/14-add-hosted-roles.sh43
2 files changed, 5 insertions, 87 deletions
diff --git a/hosted-kolab/05-add-hosted-domain.sh b/hosted-kolab/05-add-hosted-domain.sh
index 721cb40..745ce77 100755
--- a/hosted-kolab/05-add-hosted-domain.sh
+++ b/hosted-kolab/05-add-hosted-domain.sh
@@ -8,51 +8,18 @@
echo "objectclass: domainrelatedobject"
echo "objectclass: inetdomain"
echo "inetdomainstatus: active"
- echo "associateddomain: mykolab.com"
- echo "associateddomain: mykolab.ch"
+ echo "inetdomainbasedn: ou=${hosted_domain},${rootdn}"
echo ""
-
- echo "dn: cn=$(echo ${hosted_domain_rootdn} | sed -e 's/=/\\3D/g' -e 's/,/\\2D/g'),cn=mapping tree,cn=config"
- echo "objectClass: top"
- echo "objectClass: extensibleObject"
- echo "objectClass: nsMappingTree"
- echo "nsslapd-state: backend"
- echo "cn: ${hosted_domain_rootdn}"
- echo "nsslapd-backend: $(echo ${hosted_domain} | sed -e 's/\./_/g')"
- echo ""
-
- echo "dn: cn=$(echo ${hosted_domain} | sed -e 's/\./_/g'),cn=ldbm database,cn=plugins,cn=config"
- echo "objectClass: top"
- echo "objectClass: extensibleobject"
- echo "objectClass: nsbackendinstance"
- echo "cn: $(echo ${hosted_domain} | sed -e 's/\./_/g')"
- echo "nsslapd-suffix: ${hosted_domain_rootdn}"
- echo "nsslapd-cachesize: -1"
- echo "nsslapd-cachememsize: 10485760"
- echo "nsslapd-readonly: off"
- echo "nsslapd-require-index: off"
- echo "nsslapd-directory: /var/lib/dirsrv/slapd-$(hostname -s)/db/$(echo ${hosted_domain} | sed -e 's/\./_/g')"
- echo "nsslapd-dncachememsize: 10485760"
- echo ""
-
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
(
- echo "dn: ${hosted_domain_rootdn}"
- echo "aci: (targetattr=\"carLicense || description || displayName || facsimileTelephoneNumber || homePhone || homePostalAddress || initials || jpegPhoto || labeledURI || mobile || pager || photo || postOfficeBox || postalAddress || postalCode || preferredDeliveryMethod || preferredLanguage || registeredAddress || roomNumber || secretary || seeAlso || st || street || telephoneNumber || telexNumber || title || userCertificate || userPassword || userSMIMECertificate || x500UniqueIdentifier\")(version 3.0; acl \"Enable self write for common attributes\"; allow (write) userdn=\"ldap:///self\";)"
- echo "aci: (targetattr =\"*\")(version 3.0;acl \"Directory Administrators Group\";allow (all) (groupdn=\"ldap:///cn=Directory Administrators,${hosted_domain_rootdn}\" or roledn=\"ldap:///cn=kolab-admin,${hosted_domain_rootdn}\");)"
- echo "aci: (targetattr=\"*\")(version 3.0; acl \"Configuration Administrators Group\"; allow (all) groupdn=\"ldap:///cn=Configuration Administrators,ou=Groups,ou=TopologyManagement,o=NetscapeRoot\";)"
- echo "aci: (targetattr=\"*\")(version 3.0; acl \"Configuration Administrator\"; allow (all) userdn=\"ldap:///uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot\";)"
- echo "aci: (targetattr = \"*\")(version 3.0; acl \"SIE Group\"; allow (all) groupdn = \"ldap:///cn=slapd-$(hostname -s),cn=389 Directory Server,cn=Server Group,cn=$(hostname -f),ou=${domain},o=NetscapeRoot\";)"
- echo "aci: (targetattr = \"*\") (version 3.0;acl \"Search Access\";allow (read,compare,search)(userdn = \"ldap:///${hosted_domain_rootdn}??sub?(objectclass=*)\");)"
- echo "aci: (targetattr = \"*\") (version 3.0;acl \"Service Search Access\";allow (read,compare,search)(userdn = \"ldap:///uid=kolab-service,ou=Special Users,${domain_rootdn}\");)"
+
+ echo "dn: ou=${hosted_domain},${rootdn}"
+ echo "ou: ${hosted_domain}"
echo "objectClass: top"
- echo "objectClass: domain"
- echo "dc: $(echo ${hosted_domain} | cut -d'.' -f 1)"
+ echo "objectClass: organizationalunit"
echo ""
-) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
-(
echo "dn: ou=Groups,${hosted_domain_rootdn}"
echo "ou: Groups"
echo "objectClass: top"
@@ -66,12 +33,6 @@
echo "objectClass: organizationalunit"
echo ""
- echo "dn: ou=Special Users,${hosted_domain_rootdn}"
- echo "ou: Special Users"
- echo "objectClass: top"
- echo "objectClass: organizationalunit"
- echo ""
-
echo "dn: ou=Resources,${hosted_domain_rootdn}"
echo "ou: Resources"
echo "objectClass: top"
diff --git a/hosted-kolab/14-add-hosted-roles.sh b/hosted-kolab/14-add-hosted-roles.sh
deleted file mode 100755
index 42e17bf..0000000
--- a/hosted-kolab/14-add-hosted-roles.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-. ./settings.sh
-
-(
- echo "dn: cn=activesync-user,${hosted_domain_rootdn}"
- echo "objectclass: top"
- echo "objectclass: ldapsubentry"
- echo "objectclass: nsroledefinition"
- echo "objectclass: nssimpleroledefinition"
- echo "objectclass: nsmanagedroledefinition"
- echo "cn: activesync-user"
-) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
-
-(
- echo "dn: cn=imap-user,${hosted_domain_rootdn}"
- echo "objectclass: top"
- echo "objectclass: ldapsubentry"
- echo "objectclass: nsroledefinition"
- echo "objectclass: nssimpleroledefinition"
- echo "objectclass: nsmanagedroledefinition"
- echo "cn: imap-user"
-) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
-
-(
- echo "dn: cn=kolab-user,${hosted_domain_rootdn}"
- echo "objectclass: top"
- echo "objectclass: ldapsubentry"
- echo "objectclass: nsroledefinition"
- echo "objectclass: nssimpleroledefinition"
- echo "objectclass: nsmanagedroledefinition"
- echo "cn: kolab-user"
-) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
-
-#(
-# echo "dn: cn=XMPPAccount,dc=mykolab,dc=com"
-# echo "objectclass: top"
-# echo "objectclass: ldapsubentry"
-# echo "objectclass: nsroledefinition"
-# echo "objectclass: nssimpleroledefinition"
-# echo "objectclass: nsmanagedroledefinition"
-# echo "cn: XMMPUser"
-#) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"