From 4e753873c7a533e3713f4188c5282a147ae9f723 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Wed, 11 May 2016 17:41:24 +0200 Subject: [PATCH 1/2] s3:rpcclient make --pw-nt-hash option work Bug: https://bugzilla.samba.org/show_bug.cgi?id=10796 Signed-off-by: Christian Ambach Reviewed-by: Jeremy Allison (cherry picked from commit 4fe59879cc2a608194578e33e27e0dc1e2f0fc58) --- source3/rpcclient/rpcclient.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index c32fbc7..efca953 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -1084,6 +1084,9 @@ out_free: if (get_cmdline_auth_info_use_ccache(rpcclient_auth_info)) { flags |= CLI_FULL_CONNECTION_USE_CCACHE; } + if (get_cmdline_auth_info_use_pw_nt_hash(rpcclient_auth_info)) { + flags |= CLI_FULL_CONNECTION_USE_NT_HASH; + } user = talloc_strdup(frame, get_cmdline_auth_info_username(rpcclient_auth_info)); SMB_ASSERT(user != NULL); -- 1.9.1 From b9849059e895bdef202b8636229d38d0bd8bd6fd Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Wed, 11 May 2016 19:21:20 +0200 Subject: [PATCH 2/2] s3:selftest add a test for rpcclient --pw-nt-hash option Signed-off-by: Christian Ambach Reviewed-by: Jeremy Allison (cherry picked from commit d0cdf02dc9733dae960021ff1ca07587d8155e58) --- source3/script/tests/test_rpcclient_pw_nt_hash.sh | 27 +++++++++++++++++++++++ source3/selftest/tests.py | 5 +++++ 2 files changed, 32 insertions(+) create mode 100755 source3/script/tests/test_rpcclient_pw_nt_hash.sh diff --git a/source3/script/tests/test_rpcclient_pw_nt_hash.sh b/source3/script/tests/test_rpcclient_pw_nt_hash.sh new file mode 100755 index 0000000..c03d22f --- /dev/null +++ b/source3/script/tests/test_rpcclient_pw_nt_hash.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Blackbox tests for the rpcclient --pw-nt-hash option +# + +if [ $# -lt 4 ]; then +cat <