fix: remove require_signing:False, keep NTLM forced
require_signing=False caused ACCESS_DENIED on servers that enforce signing. Revert that change, keep only the NTLM protocol fix.
This commit is contained in:
1 parent
38dfb88437
commit
e15f8f9935
1 file changed
-2
@@ -113,13 +113,11 @@ def _smb_conn(host: str, username: str, password: str, port: int = 445):
|
||||
kwargs = {
|
||||
"port": port,
|
||||
"auth_protocol": "ntlm", # force NTLM, avoid Kerberos/SPNEGO failures
|
||||
"require_signing": False, # many NAS/home devices don't enforce signing
|
||||
}
|
||||
if username:
|
||||
kwargs["username"] = username
|
||||
kwargs["password"] = password or ""
|
||||
else:
|
||||
# Guest/anonymous — pass empty strings explicitly
|
||||
kwargs["username"] = ""
|
||||
kwargs["password"] = ""
|
||||
smbclient.register_session(host, **kwargs)
|
||||
|
||||
Reference in new issue
Block a user