summaryrefslogtreecommitdiff
path: root/hosted-kolab/02-replace-roles.sh
blob: 3e2d2607d2c8e2adf0c8f232fd810ab089be090a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

 . ./settings.sh

(
    echo "cn=kolab-admin,${rootdn}"
) | ldapdelete -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"

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