The Samba-Bugzilla – Attachment 12124 Details for
Bug 10796
rpcclient cannot authenticate with NT password hash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches for 4.3.x and 4.4.x with cherry-pick information
10796_backport.patch (text/plain), 3.26 KB, created by
Christian Ambach
on 2016-05-20 20:43:33 UTC
(
hide
)
Description:
patches for 4.3.x and 4.4.x with cherry-pick information
Filename:
MIME Type:
Creator:
Christian Ambach
Created:
2016-05-20 20:43:33 UTC
Size:
3.26 KB
patch
obsolete
>From 4e753873c7a533e3713f4188c5282a147ae9f723 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >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 <ambi@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(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 <ambi@samba.org> >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 <ambi@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(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 <<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 >diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py >index ce26212..753cff6 100755 >--- a/source3/selftest/tests.py >+++ b/source3/selftest/tests.py >@@ -461,6 +461,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", >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 10796
: 12124