summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-05-06 15:23:07 +0200
committerAndrew Tridgell <tridge@samba.org>2010-05-06 15:25:18 +0200
commite0f602f2c9252e4df81814fc8aa22641620f381b (patch)
tree55ebb1f29755208cefbca87af32e78583d280f01 /source4
parent9ba08c22e807b8b3e744dc3146dbca4083e3e2f4 (diff)
downloadsamba-e0f602f2c9252e4df81814fc8aa22641620f381b.tar.gz
samba-e0f602f2c9252e4df81814fc8aa22641620f381b.tar.bz2
samba-e0f602f2c9252e4df81814fc8aa22641620f381b.zip
s4-devel: auto-delete any leftover IPs
remove IP from a previous vampire_ad.sh run
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/devel/drs/vampire_ad.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/scripting/devel/drs/vampire_ad.sh b/source4/scripting/devel/drs/vampire_ad.sh
index 28f3c5a0bc..3b943a1200 100755
--- a/source4/scripting/devel/drs/vampire_ad.sh
+++ b/source4/scripting/devel/drs/vampire_ad.sh
@@ -13,6 +13,14 @@ mv -f $namedtmp $PREFIX/private/named.conf
sudo rndc reconfig
`dirname $0`/unvampire_ad.sh
+cat <<EOF > nsupdate.txt
+update delete $DNSDOMAIN A $machine_ip
+show
+send
+EOF
+echo "$pass" | kinit administrator
+nsupdate -g nsupdate.txt
+
REALM="$(echo $DNSDOMAIN | tr '[a-z]' '[A-Z]')"
sudo $GDB bin/net vampire $DNSDOMAIN -Uadministrator%$pass -s $PREFIX/etc/smb.conf --option=realm=$REALM --option="ads:dc function level=4" --option="ads:min function level=0" -d2 "$@" || exit 1