summaryrefslogtreecommitdiff
path: root/ucs-3.0/tests/16-create-john-no-mailserver.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ucs-3.0/tests/16-create-john-no-mailserver.sh')
-rwxr-xr-xucs-3.0/tests/16-create-john-no-mailserver.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/ucs-3.0/tests/16-create-john-no-mailserver.sh b/ucs-3.0/tests/16-create-john-no-mailserver.sh
new file mode 100755
index 0000000..146c072
--- /dev/null
+++ b/ucs-3.0/tests/16-create-john-no-mailserver.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+eval "$(ucr shell)"
+
+if [ "${server_role}" != "domaincontroller_master" ]; then
+ echo "SKIPPED - This system is not a master domain controller."
+ exit 0
+fi
+
+imap_server=$(ldapsearch -x -H ldap://${ldap_server_name}:${ldap_server_port} -D "${ldap_hostdn}" -y /etc/machine.secret -LLL "(univentionService=IMAP)" cn | grep ^cn | awk '{print $2}' | head -n 1)
+
+if [ -z "${imap_server}" ]; then
+ echo "FAILED - No IMAP server found"
+ exit 1
+fi
+
+univention-directory-manager users/user create \
+ --set password=Welcome2KolabSystems \
+ --set "username=doe" \
+ --set "lastname=Doe" \
+ --set "e-mail=doe@${domainname}" \
+ --set "mailPrimaryAddress=doe@${domainname}" \
+ --set "mailAlternativeAddress=ceo@${domainname}" \
+ --position "cn=users,${ldap_base}"
+
+ldapsearch -x -H ldap://${ldap_server_name}:${ldap_server_port} -b "${ldap_base}" -LLL -D "${ldap_hostdn}" -y /etc/machine.secret "(uid=doe)" entrydn univentionMailHomeServer