tedious icon indicating copy to clipboard operation
tedious copied to clipboard

NTLM Login problem

Open lloydcotten opened this issue 12 years ago • 6 comments

Hi,

Are there any tricks to getting the NTLM authentication to work (such as FQDN, formats, TDS versions, etc)? No matter what I try I get:

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

My config looks like this:

{
  userName: 'my_domain_user'",
  password: 'my_domain_password",
  domain: 'my.fq.dn',
  server: '192.168.xx.xx',
  options: { database: 'my_db' }
}

I've also tried using non-FQDN for the domain. No difference. It works if I remove domain and changed to SQL Server user.

Any ideas? Thanks!

lloydcotten avatar Oct 21 '14 17:10 lloydcotten

Unfortunately this is an extremely non-trivial issue to fix. The documentation probably needs some updating, but basically the client and the server need to both be on the same domain. I could be wrong, but I remember running into this the last time I tried connecting to SQL Server 2014 from a Linux client machine.

rossipedia avatar Oct 22 '14 03:10 rossipedia

Sorry I didn't mention that, but the client was a Windows machine on the same domain. Maybe NTLM is a YRMV type of feature?

lloydcotten avatar Oct 22 '14 09:10 lloydcotten

Currently, yeah. Acquiring the correct NTLM security token isn't actually a feature built into the TDS spec, and probably would require linking to a native library wrapper on Windows, and more than likely wouldn't be available on non-windows platforms.

rossipedia avatar Oct 22 '14 19:10 rossipedia

Any chance the docs could get updated to indicate it is more of an "experimental" feature? I'd be willing to do that - not even sure where the doc source is right now.

lloydcotten avatar Oct 24 '14 00:10 lloydcotten

The docs live in the gh-pages branch here on github. Feel free to send a pull request :)

rossipedia avatar Oct 24 '14 06:10 rossipedia

Note that there is a potential fix which may be merged in soon. See PR #228

bretcope avatar Jan 13 '15 19:01 bretcope