summaryrefslogtreecommitdiff
path: root/hosted-kolab/10-add-initial-admin-user-to-domain.sh
blob: 4d01b329cd19abf7b40634625cc03a6a5cddbed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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}"