denisenkom / pytds

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation
MIT License
190 stars 52 forks source link

NtlmAuth getting "ValueError: unsupported hash type md4" #154

Closed kurtmisc closed 11 months ago

kurtmisc commented 11 months ago

Trying to connect to mssql from posix box, so I'm using NtlmAuth to connect to the server and got. "ValueError: unsupported hash type md4". After some research it appears that ntlm_auth has been deprecated and replaced with pyspnego. ntlm-auth has been deprecated since June 2020. Is there any plans on replacing the ntlm-auth package to pyspnego?

denisenkom commented 11 months ago

I added SpnegoAuth class which uses pyspnego package in this change: https://github.com/denisenkom/pytds/commit/ba0187ffa2a79b3897e0e81782eac820d6919c3c Try using it and let me know if it works for you.

kurtmisc commented 11 months ago

That seems to have done the trick. Thanks for such a quick response. :)