mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
28 lines
568 B
Bash
Executable File
28 lines
568 B
Bash
Executable File
#!/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
|