0

It is only part of my problem but technically, I am trying to access an SQL Server with disabled SQL Server Authentication using ODBC connection string in Ubuntu OS. I already tried to connect with SQL Server Authentication enabled and it is working, I can connect to the server. But how do I connect to SQL Server with Windows Authentication?

I am trying it using odbcinst and isql but I can't make it work in windows authentication. am I missing something? or is it really possible to connect using windows auth?

Rei
  • 23
  • 2
  • 7
  • 1
    Windows Authentication doesn't prompt for credentials. Rather, it passes along whatever credentials you are already using on the client. How are you logged in to the Ubuntu machine? (Or, if you are using something like "run as...", what credentials are you using to launch `isql`?) – Doug Deden Jun 18 '19 at 21:46
  • Ubuntu is my local machine while Windows is hosted remotely. I am using docker image so I am using root user. @DougDeden – Rei Jun 19 '19 at 02:34
  • If you are not logged in to the Ubuntu machine with Windows credentials, you won't be able to pass Windows credentials along to the SQL server. – Doug Deden Jun 19 '19 at 03:26
  • Does that mean that I need to create a complete copy of my credentials from Windows? for example I have `user: foo` & `password: bar` in windows, I need to also have it exactly the same in ubuntu? – Rei Jun 19 '19 at 10:10
  • While I've seen that approach (matching the username and the password) work in older versions of Windows (in my case, it was between Windows machines in different domains, not between Linux and Windows), it hasn't worked in the last few versions. You need to log in to Ubuntu with your Windows credentials. Look for information about configuring Linux to allow logging in with Windows credentials. (Some times called Active Directory or LDAP integration.) – Doug Deden Jun 19 '19 at 14:03
  • Ok. Will try that. Thanks. How about nodejs to windoes? – Rei Jun 20 '19 at 03:52
  • I just tested it now. I used windows OS and created the same username and password and I can access the remote windows sql server using `sqlmd -S $HOST -E` with no issue. But not in Ubuntu. I need to setup first a kerberos. Will give an update after I setup it. But thanks mate. You help me alot. – Rei Jun 20 '19 at 06:56

0 Answers0