denisenkom / pytds

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

SSPI not working in linux due to WINFUNTYPE import #140

Closed sam2332 closed 1 year ago

sam2332 commented 1 year ago

https://github.com/denisenkom/pytds/blob/7c73812444dd3c38c893dd88d14e138908069bd0/src/pytds/sspi.py#L2

This line is giving errors on linux systems due to usage of winctypes, is there anyway to migrate to a flow that does not use the windows only types?

takoau commented 1 year ago

@sam2332 can you upload the error?

takoau commented 1 year ago

@sam2332 Why not use Kerberos as you login from Linux? Active Directory authentication for SQL Server on Linux

takoau commented 1 year ago

@sam2332 like this: conn.pytds.connect(dsn=hostname, port=port, use_sso=True)

denisenkom commented 1 year ago

SSPI is only available on Windows. On Linux you need to use Kerberos or NTLM.