s3: check that a user in a bogus domain name is mapped to the localnetbios name of...
authorMatthieu Patou <mat@matws.net>
Mon, 30 Jan 2012 06:12:40 +0000 (22:12 -0800)
committerMatthieu Patou <mat@matws.net>
Mon, 30 Jan 2012 16:23:11 +0000 (08:23 -0800)
This means that if we authentify for BOGUS\administrator in AD domain
FOREST with samba being domain member with the netbiosname MEMBER then
BOGUS\administrator will be mapped to MEMBER\administrator if the
password match.

testprogs/blackbox/bogus.sh [new file with mode: 0755]

index 82f0ae9..ccc899b 100755 (executable)
@@ -367,6 +367,7 @@ for mech in [
         plansmbtorturetestsuite('base.xcopy', "plugin_s4_dc",
                                ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name)
+plantestsuite("samba4.blackbox.bogusdomain", "s3member", ["testprogs/blackbox/bogus.sh", "$NETBIOSNAME", "xcopy_share", '$DC_USERNAME', '$DC_PASSWORD'], allow_empty_output=True)
 for mech in [
     "-k no",
     "-k no --option=usespnego=no",
diff --git a/testprogs/blackbox/bogus.sh b/testprogs/blackbox/bogus.sh
new file mode 100755 (executable)
index 0000000..019957b
--- /dev/null
@@ -0,0 +1,20 @@
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: blackbox_newuser.sh PREFIX
+exit 1;
+. `dirname $0`/subunit.sh
+testit_expect_failure "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$USER%$PWD -c "dir"&& failed=`expr $failed + 1`
+./bin/net rpc user add $USER $PWD -W $SERVER -U$USER%$PWD -S $SERVER
+testit "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$USER%$PWD -c "dir"|| failed=`expr $failed + 1`
+exit $failed