2

I have a problem configuring an Ubuntu 18.04. client to connect to MSSQL Server using Windows Authentication. First of all, Kerberos/AD Login works fine using PAM and Winbind, connection using SQL Authentication works fine too with sqlcmd and php sqlsrv_connect.

But when I use sqlcmd -E -S vm-server\\prod -d Database it stops with result:

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : SSPI Provider: Server not found in Kerberos database.

I've added a DSN configuration to my /etc/odbc.ini file like:

[MSSQL]
Driver = ODBC Driver 17 for SQL Server
Server = vm-server\prod
ServerSPN = MSSQLSvc/vm-client
ServerSPN = MSSQLSvc/vm-client@DOMAIN.INTERNAL (as an alternative, with uppercase domain)
User =
Password =

And start sqlcmd again with sqlcmd -D -E -S MSSQL -d Database. Now I get another error:

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : SSPI Provider: Message stream modified.

Last try, using domain name:

[MSSQL]
Driver = ODBC Driver 17 for SQL Server
Server = vm-server\prod
ServerSPN = MSSQLSvc/vm-client@domain.internal (Lowercase!)
User =
Password =
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : SSPI Provider: KDC reply did not match expectations.

Any ideas how to fix this issue? It's documented everywhere to use UPPERCASE domain name, but both types are not working.

As mentioned above, AD Auth using winbind works well. Apache2 Mod auth kerb works fine too.

Thx in advance!

Best regards

Alex
  • 21
  • 2

0 Answers0