From d0cbf8bd59e5386912d0ddfda8ac5d7774eba3ce Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Sep 2012 13:22:28 +0200 Subject: Add scripts to allow/disallow anonymous binds Add script to cleanup and start all over Add additional settings for hosted example --- 00-allow-anonymous-bind.sh | 11 +++++++++++ 00-disallow-anonymous-bind.sh | 11 +++++++++++ cleanup-and-start-over.sh | 21 +++++++++++++++++++++ settings.sh | 3 +++ 4 files changed, 46 insertions(+) create mode 100755 00-allow-anonymous-bind.sh create mode 100755 00-disallow-anonymous-bind.sh create mode 100755 cleanup-and-start-over.sh diff --git a/00-allow-anonymous-bind.sh b/00-allow-anonymous-bind.sh new file mode 100755 index 0000000..d96748f --- /dev/null +++ b/00-allow-anonymous-bind.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + . ./settings.sh + +( + echo "dn: cn=config" + echo "changetype: modify" + echo "replace: nsslapd-allow-anonymous-access" + echo "nsslapd-allow-anonymous-access: on" + echo "" +) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" diff --git a/00-disallow-anonymous-bind.sh b/00-disallow-anonymous-bind.sh new file mode 100755 index 0000000..8ec0f94 --- /dev/null +++ b/00-disallow-anonymous-bind.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + . ./settings.sh + +( + echo "dn: cn=config" + echo "changetype: modify" + echo "replace: nsslapd-allow-anonymous-access" + echo "nsslapd-allow-anonymous-access: off" + echo "" +) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" diff --git a/cleanup-and-start-over.sh b/cleanup-and-start-over.sh new file mode 100755 index 0000000..c22fb50 --- /dev/null +++ b/cleanup-and-start-over.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +yum -y remove 389\* cyrus-imapd\* postfix\* mysql-server\* roundcube\* pykolab\* + +rm -rvf \ + /etc/dirsrv \ + /etc/kolab/kolab.conf \ + /etc/postfix \ + /usr/lib64/dirsrv \ + /usr/share/dirsrv \ + /var/cache/dirsrv \ + /var/lib/dirsrv \ + /var/lib/imap \ + /var/lib/kolab \ + /var/lib/mysql \ + /var/spool/imap \ + /var/spool/postfix + +yum clean metadata +yum -y install kolab + diff --git a/settings.sh b/settings.sh index 1eb1dce..22f6b07 100755 --- a/settings.sh +++ b/settings.sh @@ -13,3 +13,6 @@ export kolab2_base="kolab.kolabsys.com:/kolab/var/imapd/" export imap_host="${ldap_host}" export cyrus_admin_pw="${ldap_bindpw}" +export hosted_kolab_service_pw="${ldap_bindpw}" +export hosted_domain="demo.kolab.org" +export hosted_domain_rootdn="dc=demo,dc=kolab,dc=org" -- cgit v0.12