summaryrefslogtreecommitdiff
path: root/hosted-kolab/99-remove-users.sh
blob: d6e39fceacf275efee432a357e6d112ccb61e374 (plain)
1
2
3
4
5
6
7
#!/bin/bash

. ./settings.sh

(
    ldapsearch -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -b ${hosted_domain_rootdn} "(mailalternateaddress=*)" dn | grep ^dn | sed -e 's/dn: //g'
) | ldapdelete -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"