Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gladmustang opened this issue Dec 10, 2018 · 6 comments
Labels
Idle Waiting for more information for a while...

Comments

@gladmustang
Copy link

I am using tedious 3.0.1 to connect sql server, I want to use windows authentication, my config looks like this,
var config = {
domain: 'XXXXCLOUD',
userName: 'XX_SA_XX_XXXX_XX',
password: "my pass"
server: 'XX-ZU2SQLXXX.XXXXCLOUD.com',
options: {
database: 'dbname',
encrypt: true,
port: 1433
}
}
After run command, I got "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication." error.
The sql server I am trying to connect is : sql server 2016
I am using runas command like below in my local machine, so I can try to login with correct domain:
runas /netonly /env /user:XXXXCLOUD\XX_SA_XX_XXXX_XX "node tediousClientConnect" (tediousClientConnect is my node client app which using tedious to connect sql)

Can anyone help to provide a solution on this ?

@Hadis-Knj
Copy link

Hadis-Knj commented Dec 12, 2018

@gladmustang I am not able to help with this info 🤷‍♀️ but the error is telling what could be the potential issue. are you able to connect to the server using SSMS with the same config? if you're able to run the same script using runas then the issue should be in env setup not in tedious

@gladmustang
Copy link
Author

Hi Hadis-Fard,
I can use SSMS with the same command, so I think it will not be the env issue.
runas /netonly /env /user:XXXXCLOUD\XX_SA_XX_XXXX_XX ssms
Also, I tried msnodesqlv8 with similiar command, and I can connect to remote DB, so I think it should not be the env issue. Do you need me to provide other information that may help you to track issue ?

@arthurschreiber
Copy link
Collaborator

Sometimes the server requires passing through the workstation name as well. Unfortunately, we currently don't expose that option. I'll see if I can open a PR to allow this, and maybe you can then see if that helps you in your case.

Sorry you're facing this trouble. 🙇

@gladmustang
Copy link
Author

Hi arthurschreiber,
Thanks for response and help, waiting for your further update.

@BenjaminVanRyseghem
Copy link

I might be facing the same issue

@IanChokS
Copy link
Member

Hi @gladmustang, are you still facing the same issue with the latest tedious version?

@IanChokS IanChokS added Follow up Recent question asked by tedious members for old issues or discussion that requires member input Idle Waiting for more information for a while... and removed Follow up Recent question asked by tedious members for old issues or discussion that requires member input labels Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idle Waiting for more information for a while...
Projects
None yet
Development

No branches or pull requests

5 participants