summaryrefslogtreecommitdiff
path: root/hosted-kolab/10-add-initial-admin-user-to-domain.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hosted-kolab/10-add-initial-admin-user-to-domain.sh')
-rwxr-xr-xhosted-kolab/10-add-initial-admin-user-to-domain.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/hosted-kolab/10-add-initial-admin-user-to-domain.sh b/hosted-kolab/10-add-initial-admin-user-to-domain.sh
new file mode 100755
index 0000000..4d01b32
--- /dev/null
+++ b/hosted-kolab/10-add-initial-admin-user-to-domain.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+(
+ echo "dn: uid=admin,ou=People,dc=kolabsys,dc=com"
+ echo "objectclass: top"
+ echo "objectclass: inetorgperson"
+ echo "objectclass: person"
+ echo "uid: admin"
+ echo "cn: Temporary Administrator"
+ echo "sn: Administrator"
+ echo "givenname: Temporary"
+ echo "displayname: Temporary Administrator"
+ echo "mail: admin@kolabsys.com"
+ echo "nsroledn: cn=kolab-admin,dc=kolabsys,dc=com"
+ echo "userpassword: ${ldap_bindpw}"
+ echo ""
+) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
+
+(
+ echo "dn: uid=admin,ou=People,dc=kolab,dc=org"
+ echo "objectclass: top"
+ echo "objectclass: inetorgperson"
+ echo "objectclass: person"
+ echo "uid: admin"
+ echo "cn: Temporary Administrator"
+ echo "sn: Administrator"
+ echo "givenname: Temporary"
+ echo "displayname: Temporary Administrator"
+ echo "mail: admin@kolab.org"
+ echo "nsroledn: cn=kolab-admin,dc=kolab,dc=org"
+ echo "userpassword: ${ldap_bindpw}"
+ echo ""
+) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
+
+(
+ echo "dn: uid=admin,ou=People,dc=demo,dc=kolab,dc=org"
+ echo "objectclass: top"
+ echo "objectclass: inetorgperson"
+ echo "objectclass: person"
+ echo "uid: admin"
+ echo "cn: Temporary Administrator"
+ echo "sn: Administrator"
+ echo "givenname: Temporary"
+ echo "displayname: Temporary Administrator"
+ echo "mail: admin@demo.kolab.org"
+ echo "nsroledn: cn=kolab-admin,dc=demo,dc=kolab,dc=org"
+ echo "userpassword: ${ldap_bindpw}"
+ echo ""
+) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
+