8 March 2011

We have frequently been running in to this error on Windows 7: “The trust relationship between this workstation and the primary domain failed.” The error appears during login after you type in your username and password and hit enter.

Our solution in the past was to reload the machine from our standard image for a few reasons:

This problem has happened frequently enough to where I decided to revisit Google to see if anyone else has found a way around this. The result that I found was laughably easy. Here it is:

  1. Boot with a Windows 7 Install or Repair Disc

  2. If using an Install Disc, click Repair Computer in the bottom left-hand corner.

  3. Select your OS from the list after it populates.

  4. Select Command Prompt.

  5. Type the following commands, hitting enter after each:

    • cd /d C:\Windows\System32
    • move sethc.exe \
    • copy cmd.exe sethc.exe
  6. Restart the computer normally.

  7. When the Login screen appears, hit the Shift key 5 times.

  8. At the Command Prompt, type the following commands:

    • net user Administrator * (then set a password)
    • net user Administrator /active:yes
    • move \sethc.exe
  9. Close the Command Prompt and login as Administrator.

  10. Detach the domputer from the domain and restart.

  11. Login as Administrator again and re-attach the computer to the domain.

  12. Restart and you’re done!

Stupid easy right?

What this is doing is taking advantage of the Ease of Access feature during login. We’re replacing the Ease of Access program (sethc.exe) with a copy of the Command Prompt (cmd.exe). In this way, when we hit the Shift key 5 times, we get the command prompt.