summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@kolab.example.org>2012-09-06 11:22:28 (GMT)
committerroot <root@kolab.example.org>2012-09-06 11:22:28 (GMT)
commitd0cbf8bd59e5386912d0ddfda8ac5d7774eba3ce (patch)
treee7816a37acc05e2f9bf47c74ed57502c81ec0063
parenteb5a03a1e378bcbba91527222674b6ec7e9fdd13 (diff)
downloadkolab-scripts-d0cbf8bd59e5386912d0ddfda8ac5d7774eba3ce.tar.gz
Add scripts to allow/disallow anonymous binds
Add script to cleanup and start all over Add additional settings for hosted example
-rwxr-xr-x00-allow-anonymous-bind.sh11
-rwxr-xr-x00-disallow-anonymous-bind.sh11
-rwxr-xr-xcleanup-and-start-over.sh21
-rwxr-xr-xsettings.sh3
4 files changed, 46 insertions, 0 deletions
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"