From a4c7680fc6628e88152e687b6341f1d72596d17f Mon Sep 17 00:00:00 2001 From: Dliv3 Date: Tue, 9 Nov 2021 20:19:06 +0800 Subject: [PATCH] Fix winrm login failed --- cme/protocols/winrm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cme/protocols/winrm.py b/cme/protocols/winrm.py index c43b94d6..5d4c803d 100644 --- a/cme/protocols/winrm.py +++ b/cme/protocols/winrm.py @@ -135,7 +135,7 @@ class winrm(connection): log.addFilter(SuppressFilter()) self.conn = Client(self.host, auth='ntlm', - username=username, + username=u'{}\\{}'.format(domain, username), password=password, ssl=False) @@ -182,7 +182,7 @@ class winrm(connection): if nthash: self.nthash = nthash self.conn = Client(self.host, auth='ntlm', - username=username, + username=u'{}\\{}'.format(domain, username), password=ntlm_hash, ssl=False)