Tuesday, 24 February 2015

Domain Kerberos Error

This post describes how to resolve the following Kerberos error:
"The trust relationship between this workstation and the primary domain failed"

Although the error message states "workstation", the exact same error message will be seen on Windows Servers too.

Although this error can be seen for a variety of reasons, it is typically found when a domain connected machine is restored to a previous point in time via third party tools (i.e. not Windows restore), or when using snapshots in a virtual environment.  It occurs because the computer's account has become mismatched with the one on the domain controller.

One could simply remove the machine from the domain and re-add it, however this can be a pain, especially if you have more than one machine with the error.  The other option is to reset the computer account, so that it is in sync with the one on the domain controller.

To reset the account
  1. Log on to the affected machine using the local administrator account
  2. Open PowerShell
  3. Run the following command:
    Test-ComputerSecureChannel -Repair -Credential (Get-Credential) -VerboseWhen prompted, enter the credentials of a user that has Domain Admin permissions.
  4. The account will be reset and PowerShell report a successful repair.
  5. The connection can be tested by running the following command:
    Test-ComputerSecureChannel -Verbose
    This command should report that the secure channel is in good condition.
You can now log off and back on as a domain user.

No comments:

Post a Comment