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.