简体   繁体   中英

SQL Server: The login is from an untrusted domain and cannot be used with Windows authentication (Error: 18452)

Recently I've noticed that if I try and connect to a SQL Server on our domain (LAN) using Windows Authentication, I now receive the message:

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication (Error: 18452)

This is a new problem, and the configuration of both my machine and the server have not changed.

However this error might have started when I replaced an old Windows 2000 domain controller with a Windows 2008 domain controller (leaving one unmodified Windows 2003 DC as a backup DC). At this time, domain "functional level" was raised to 2003 from 2000.

The cause of the error seems to be the presence of the SQL Server machine name in my hosts file. If I remove the server's entry from the hosts file, I can connect OK. If I put it back, I get the error above.

So the main question is: Why would the presence of the SQL Server's machine name in my hosts file cause Windows Authentication to fail?

The hosts file has the correct IP address and this problem has only just started occurring despite the fact I've not changed my hosts file for months.

We have been experiencing the same thing, and it was all down to a botched windows patch. infoworld article kb3002657 Today I updated both our dcs with the new patch, there is actually two just been released, and everything started working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM