Hello,
I have the in the title mentioned error in the following environment.
I have a test windows domain (2016) with some test windows servers running as members of the domain. On some of them MS SQL 2016 installed.
In addition, I installed for testing an UBUNTU Linux 16.04.3 and MS SQL Server 2017 on it. Server name is UBNTSQL / IPv4 is 10.10.11.199.
I joined the UBNTSQL server to the Kerberos realm of my domain. In “AD Users & Computers” I can find my UBNTSQL server in an extra created OU=Linux. Also in “ADSI Editor” with the distinguished
name
CN=UBNTSQL,OU=Linux,DC=mytestdom,DC=mycompany,DC=com
All looks fine.
I can connect to my test SQL instance on UBUNTU as’sa’ with the proper password. With the local
’sa’ user, all is working excellent.
I can also execute the following statements:
CREATELOGIN [MYTESTDOM\MYSQLUSR]FROMWINDOWS;
GO
The ’MYSQLUSR’ is an extra user, created in the MYTESTDOM. It is a member of the ’Domain Admins’ group.
As the result, the login created.
I can also assign the new created login the ’sysadmin’ server role. I can create in my test database ‘UBNT17’ the user ’MYSQLUSR’ and map the user to the login ’MYTESTDOM\MYSQLUSR’.
All working.
I do can login to the UBUNTU Linux as the user ’MYTESTDOM\MYSQLUSR’. It shows me, the server belongs really to the domain / realm.
The only thing, I cannot run, is to connect from a Windows server – member of the mentioned domain to the UBNTSQL SQL server using the integrated security.
I try actually the following.
1. I connect to Windows as the user ’MYTESTDOM\MYSQLUSR’.
2. I start CMD and try to execute:
sqlcmd –S
10.10.11.199–d UBNT17 –E
I receive the message:
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login failed.
The login is from an untrusted domain and cannot be used with Integrated authentication.
From the same CMD session, the following command is working excellent.
sqlcmd –S 10.10.11.199 –U sa –P mypassword
The same error I receive, if I start SQL Operations Studio on Windows and try to connect:
System.Data.SqlClient.SqlException (0x80131904):
Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData,
Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.<>c__DisplayClass22_0.<TryGetConnection>b__0(Task`1 _)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>c__DisplayClass28_0.<<OpenAsync>b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Connection\ReliableConnection\ReliableSqlConnection.cs:line
298
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Connection\ConnectionService.cs:line 542
ClientConnectionId:439d4b50-d1c8-40cd-9cff-39d102e125c0
Error Number:18452,State:1,Class:14
I will be glad to have any ideas to fix the issue.