We don't need this DC once the ldapcmp is over, and it avoids
the running DC spamming the logs looking for it.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
$SAMBA_TOOL domain join $REALM dc $JOIN_ARGS --option="netbios name = TESTJOINDC"
}
+demote_joined_dc() {
+ DEMOTE_ARGS="--remove-other-dead-server=TESTJOINDC --server=$SERVER -U$USERNAME%$PASSWORD"
+ $SAMBA_TOOL domain demote $DEMOTE_ARGS
+}
+
ldapcmp_result() {
DB1_PATH="tdb://$PREFIX_ABS/$SERVER/private/sam.ldb"
DB2_PATH="tdb://$TARGET_DIR/private/sam.ldb"
# check resulting DB matches server DC
testit "new_db_matches" ldapcmp_result
+testit "demote_joined_dc" demote_joined_dc
+
cleanup_output_dir
exit $failed