summaryrefslogtreecommitdiff
path: root/source4/scripting/devel/drs/unvampire_ad.sh
blob: dbd3cfb431ada20032ed566e2e22fb33fcc76c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

set -x

. `dirname $0`/vars

if [ -z "$site" ]; then
    site="Default-First-Site-Name"
fi

bin/ldbdel -r -H ldap://$server.$DNSDOMAIN -U$workgroup/administrator%$pass "CN=$machine,CN=Computers,$dn"
bin/ldbdel -r -H ldap://$server.$DNSDOMAIN -U$workgroup/administrator%$pass "CN=$machine,OU=Domain Controllers,$dn"
bin/ldbdel -r -H ldap://$server.$DNSDOMAIN -U$workgroup/administrator%$pass "CN=$machine,CN=Servers,CN=$site,CN=Sites,CN=Configuration,$dn"
rm -f $PREFIX/private/*.ldb