summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2012-01-29 22:12:40 -0800
committerMatthieu Patou <mat@matws.net>2012-01-30 08:23:11 -0800
commit7350d994096efa62031f4f75cf92fb4ade2b2655 (patch)
tree8e80fb2bc12e1f1aab2fd595a30bb83d367df0f4 /testprogs
parent959d13ac204db88613e1b81eff72575c5a8f8edb (diff)
downloadsamba-7350d994096efa62031f4f75cf92fb4ade2b2655.tar.gz
samba-7350d994096efa62031f4f75cf92fb4ade2b2655.tar.bz2
samba-7350d994096efa62031f4f75cf92fb4ade2b2655.zip
s3: check that a user in a bogus domain name is mapped to the localnetbios name of a domain member
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.
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/bogus.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/testprogs/blackbox/bogus.sh b/testprogs/blackbox/bogus.sh
new file mode 100755
index 0000000000..019957bf70
--- /dev/null
+++ b/testprogs/blackbox/bogus.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: blackbox_newuser.sh PREFIX
+EOF
+exit 1;
+fi
+
+. `dirname $0`/subunit.sh
+
+SERVER=$1
+SHARE=$2
+USER=$3
+PWD=$4
+smbclient="$BINDIR/smbclient"
+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