summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-21 12:47:11 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-21 12:47:11 (GMT)
commitae9c40869c9ddd0312e85505ac6f967684fadf72 (patch)
tree5a4808cb51a147271138469ead6dca3b13b8b1b7
parent6ae88bf3ca8ba6ce10f8786b8e30597a5adc0af4 (diff)
downloadkolab-scripts-ae9c40869c9ddd0312e85505ac6f967684fadf72.tar.gz
Add additional utility scripts
-rwxr-xr-xutils/disable-7-bit-plugin.sh16
-rwxr-xr-xutils/disable-access-log.sh12
-rwxr-xr-xutils/disable-audit-log.sh12
-rwxr-xr-xutils/enable-access-log.sh12
-rwxr-xr-xutils/enable-audit-log.sh12
5 files changed, 64 insertions, 0 deletions
diff --git a/utils/disable-7-bit-plugin.sh b/utils/disable-7-bit-plugin.sh
new file mode 100755
index 0000000..8439dca
--- /dev/null
+++ b/utils/disable-7-bit-plugin.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+(
+ echo "dn: cn=7-bit check,cn=plugins,cn=config"
+ echo "changetype: modify"
+ echo "replace: nsslapd-pluginarg2"
+ echo "nsslapd-pluginarg2: ,"
+ echo "-"
+ echo "replace: nsslapd-pluginarg3"
+ echo "nsslapd-pluginarg3: ${rootdn}"
+ echo "-"
+ echo "delete: nsslapd-pluginarg4"
+ echo ""
+) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
diff --git a/utils/disable-access-log.sh b/utils/disable-access-log.sh
new file mode 100755
index 0000000..e6964ca
--- /dev/null
+++ b/utils/disable-access-log.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+(
+ echo "dn: cn=config"
+ echo "changetype: modify"
+ echo "replace: nsslapd-accesslog-logging-enabled"
+ echo "nsslapd-accesslog-logging-enabled: off"
+ echo ""
+) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+
diff --git a/utils/disable-audit-log.sh b/utils/disable-audit-log.sh
new file mode 100755
index 0000000..7710fc2
--- /dev/null
+++ b/utils/disable-audit-log.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+(
+ echo "dn: cn=config"
+ echo "changetype: modify"
+ echo "replace: nsslapd-auditlog-logging-enabled"
+ echo "nsslapd-auditlog-logging-enabled: off"
+ echo ""
+) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+
diff --git a/utils/enable-access-log.sh b/utils/enable-access-log.sh
new file mode 100755
index 0000000..4b2f767
--- /dev/null
+++ b/utils/enable-access-log.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+(
+ echo "dn: cn=config"
+ echo "changetype: modify"
+ echo "replace: nsslapd-accesslog-logging-enabled"
+ echo "nsslapd-accesslog-logging-enabled: on"
+ echo ""
+) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+
diff --git a/utils/enable-audit-log.sh b/utils/enable-audit-log.sh
new file mode 100755
index 0000000..5308c7e
--- /dev/null
+++ b/utils/enable-audit-log.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+(
+ echo "dn: cn=config"
+ echo "changetype: modify"
+ echo "replace: nsslapd-auditlog-logging-enabled"
+ echo "nsslapd-auditlog-logging-enabled: on"
+ echo ""
+) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+