NTLM Login problem
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!
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.
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?
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.
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.
The docs live in the gh-pages branch here on github. Feel free to send a pull request :)
Note that there is a potential fix which may be merged in soon. See PR #228