s3-selftest: run ntlm_auth against winbindd in make test
[Samba.git] / source3 / script / tests / test_ntlm_auth_s3.sh
blob1655d7518b53396b9b215d2574b604bf2e0c5e19
1 #!/bin/sh
3 if [ $# -lt 2 ]; then
4 cat <<EOF
5 Usage: test_ntlm_auth_s3.sh PYTHON SRC3DIR NTLM_AUTH
6 EOF
7 exit 1;
8 fi
10 PYTHON=$1
11 SRC3DIR=$2
12 NTLM_AUTH=$3
13 DOMAIN=$4
14 USERNAME=$5
15 PASSWORD=$6
16 shift 6
17 ADDARGS="$*"
19 incdir=`dirname $0`/../../../testprogs/blackbox
20 . $incdir/subunit.sh
22 failed=0
24 testit "ntlm_auth" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH $ADDARGS || failed=`expr $failed + 1`
25 # This should work even with NTLMv2
26 testit "ntlm_auth with specified domain" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH $ADDARGS --client-domain=fOo --server-domain=fOo || failed=`expr $failed + 1`
27 testit "ntlm_auth against winbindd" $PYTHON $SRC3DIR/torture/test_ntlm_auth.py $NTLM_AUTH --client-username=$USERNAME --client-domain=$DOMAIN --client-password=$PASSWORD --server-use-winbindd $ADDARGS || failed=`expr $failed + 1`
30 testok $0 $failed