From 6e4c35f800764bd633d50724c57aedb72ba99f33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Mon, 13 Jan 2025 20:26:01 +0100 Subject: [PATCH] selfest: add test for non-local offlinejoin provision BUG: https://bugzilla.samba.org/show_bug.cgi?id=15777 Guenther Signed-off-by: Guenther Deschner Reviewed-by: Andreas Schneider (cherry picked from commit 6d4ad4d6824e81ef85dd924d550222dd6a322a15) --- testprogs/blackbox/test_net_offline.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testprogs/blackbox/test_net_offline.sh b/testprogs/blackbox/test_net_offline.sh index d885b337cea..e5b57e5431a 100755 --- a/testprogs/blackbox/test_net_offline.sh +++ b/testprogs/blackbox/test_net_offline.sh @@ -34,6 +34,20 @@ samba_texpect="$BINDIR/texpect" netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1') +# 0. Test with machine_name != lp_netbios_name() + +NONLOCALMACHINE=win11 + +testit "provision with non local machine name" \ + ${VALGRIND} ${net_tool} offlinejoin provision domain="${REALM}" machine_name="${NONLOCALMACHINE}" savefile="${ODJFILE}" -U"${DC_USERNAME}%${DC_PASSWORD}" || \ + failed=$((failed + 1)) + +testit "net rpc user delete" \ + ${VALGRIND} ${net_tool} rpc user delete "${NONLOCALMACHINE}$" -U"${DC_USERNAME}%${DC_PASSWORD}" -S "${DC_SERVER}" || \ + failed=$((failed + 1)) + +rm -f "${ODJFILE}" + # 1. Test w/o dcname testit "provision without dcname" $VALGRIND $net_tool offlinejoin provision domain=$REALM machine_name=$netbios savefile=$ODJFILE -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) -- 2.47.2