summaryrefslogtreecommitdiff
path: root/hosted-kolab/14-add-hosted-roles.sh
blob: 42e17bf9b09ac98ff0bef947c29f9a053482de44 (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
#!/bin/bash

. ./settings.sh

(
    echo "dn: cn=activesync-user,${hosted_domain_rootdn}"
    echo "objectclass: top"
    echo "objectclass: ldapsubentry"
    echo "objectclass: nsroledefinition"
    echo "objectclass: nssimpleroledefinition"
    echo "objectclass: nsmanagedroledefinition"
    echo "cn: activesync-user"
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"

(
    echo "dn: cn=imap-user,${hosted_domain_rootdn}"
    echo "objectclass: top"
    echo "objectclass: ldapsubentry"
    echo "objectclass: nsroledefinition"
    echo "objectclass: nssimpleroledefinition"
    echo "objectclass: nsmanagedroledefinition"
    echo "cn: imap-user"
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"

(
    echo "dn: cn=kolab-user,${hosted_domain_rootdn}"
    echo "objectclass: top"
    echo "objectclass: ldapsubentry"
    echo "objectclass: nsroledefinition"
    echo "objectclass: nssimpleroledefinition"
    echo "objectclass: nsmanagedroledefinition"
    echo "cn: kolab-user"
) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"

#(
#    echo "dn: cn=XMPPAccount,dc=mykolab,dc=com"
#    echo "objectclass: top"
#    echo "objectclass: ldapsubentry"
#    echo "objectclass: nsroledefinition"
#    echo "objectclass: nssimpleroledefinition"
#    echo "objectclass: nsmanagedroledefinition"
#    echo "cn: XMMPUser"
#) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"