Resolving Exchange Login Issues Due to a Domain Relationship Trust Failure
Snapshots can save quite a bit of time, and make it easier and cleaner to recover from unexpected issues, or configuration mistakes. In many ways, it's akin to reloading a Cisco router without saving the running-config to the startup-config. It can be a life saver when used properly, but there's another side to the story, especially when you're working within a virtualized Active Directory environment.
The Problem
Today, I find myself, for the second time in the past year, staring at an error message on the login screen to my development Exchange 2010 server, telling me I can't login, because the domain trust is broken.
"The trust relationship between this workstation and the primary domain failed."
The Solution
The solution is actually pretty easy, assuming you are able to login to the server with a local Administrator account.- Log in to the impacted server with a local administrator account. (You do have your local admin account password right?)
- Launch a command window using the Run As Administrator option.
- From the command prompt, run:
- /s = FQDN of the domain controller running the PDC Emulator Service.
- /ud = Domain Administrator Account
- /pd = Passord for the Domain Administrator Account
This solution will work with many Windows 2003 and Windows 2008 servers. For Windows 2003 servers, you may need to install the Support Tools from your installation media.
If you need to reset the machine account password for a domain controller, you must first stop the Kerberos Key Distribution Center service on all domain controllers, except your Global Catalog, then remove the Kerberos ticket cache on the domain controller where you receive the errors by rebooting. (Optionally there are a number of utilities you can use, such as KLIST, Kerbtest, or KerbTray, instead of rebooting, however use of these tools are beyond the scope of this article.)
Troubleshooting
When running NETDOM, you might receive an error such as:
The machine account password for the local machine could not be reset.
Logon Failure: The target account name is incorrect.
The command failed to complete successfully.
Windows 2008 R2 Server, Exchange 2010 Server, NETDOM, Windows 2003 Server, VMWare, Virtualization, Active Directory, Domain Trust
Thank you very much for sharing this information! My Exchange 2010 was restored from Acronis backup because of failed SP2 Rollup 6. After recovering it produced the mentioned error. Using your post I successfully solved it.
ReplyDeleteA small hint for those who experience the same problem: please note that "/s:server.domain.name.com" means DC name, not Exchange server name.
Thank you for the feedback Sergei. I re-read the post after your comment and was able to see how this could be unclear to those who have not used this command before, so I added some clearification about the input for each switch.
ReplyDelete