1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

s3:selftest add a test for rpcclient --pw-nt-hash option

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Christian Ambach 2016-05-11 19:21:20 +02:00 committed by Jeremy Allison
parent 4fe59879cc
commit d0cdf02dc9
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/bin/sh
#
# Blackbox tests for the rpcclient --pw-nt-hash option
#
if [ $# -lt 4 ]; then
cat <<EOF
Usage: test_rpcclient_pw_nt_hash.sh USERNAME PASSWORD SERVER RPCCLIENT
EOF
exit 1;
fi
USERNAME="$1"
PASSWORD="$2"
SERVER="$3"
RPCCLIENT="$4"
HASH=`echo -n $PASSWORD | iconv -t utf16le | openssl md4 |cut -d ' ' -f2`
RPCCLIENTCMD="$RPCCLIENT $SERVER --pw-nt-hash -U$USERNAME%$HASH -c queryuser"
incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh
testit "rpcclient --pw-nt-hash" $RPCCLIENTCMD || failed=`expr $failed + 1`
testok $0 $failed

View File

@ -464,6 +464,11 @@ plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
"$USERNAME", "$PASSWORD", "$SERVER",
os.path.join(bindir(), "rpcclient"), "tmp"])
plantestsuite("samba3.blackbox.rpcclient.pw-nt-hash", "simpleserver",
[os.path.join(samba3srcdir, "script/tests/test_rpcclient_pw_nt_hash.sh"),
"$USERNAME", "$PASSWORD", "$SERVER",
os.path.join(bindir(), "rpcclient")])
options_list = ["", "-e"]
for options in options_list:
plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",