#!/bin/sh if [ $# -lt 3 ]; then cat < $global_inject_conf << _EOF server min protocol = LANMAN1 client min protocol = LANMAN1 lanman auth = no _EOF opt="--option=clientminprotocol=LANMAN1 -m LANMAN1 -c ls --option=clientNTLMv2auth=no --option=clientlanmanauth=yes -W ${SERVER} -U${USERNAME}%${PASSWORD}" test_smbclient_expect_failure "test_lm_fail" "ls" "//$SERVER/tmp" $opt || failed=$(expr $failed + 1) cat > $global_inject_conf << _EOF server min protocol = LANMAN1 client min protocol = LANMAN1 lanman auth = yes ntlm auth = yes _EOF test_smbclient "test_lm_ok" "ls" "//$SERVER/tmp" $opt || failed=$(expr $failed + 1) cat > $global_inject_conf << _EOF server min protocol = LANMAN1 client min protocol = LANMAN1 lanman auth = yes ntlm auth = yes encrypt passwords = no _EOF test_smbclient_expect_failure "test_plaintext_fail_local" "ls" "//$SERVER/tmp" $opt || failed=$(expr $failed + 1) opt="--option=clientminprotocol=LANMAN1 -m LANMAN1 -c ls --option=clientNTLMv2auth=no --option=clientlanmanauth=yes --option=clientplaintextauth=yes -W ${SERVER} -U${USERNAME}%${PASSWORD}" test_smbclient "test_plaintext_ok" "ls" "//$SERVER/tmp" $opt || failed=$(expr $failed + 1) echo '' >$global_inject_conf testok $0 $failed