OS Deployer - Knowledge base

Trust relationship between this workstation and the primary domain failed!

Problem

You can see the error message "Trust relationship between this workstation and the primary domain failed" on the screen when you try to do either of the following:

  • When installing image creator component.
  • When you are trying to access a remote machine's share.

Cause

  1. Invalid domain user credentials
  2. When multiple computers exist with the same name inside a domain

Resolution

To resolve this problem, follow any of the solutions given below,

Rejoin the computer to the domain 

Follow the steps given below to remove the computer from the domain, and then connect the computer to the domain.

  1. Use a local administrator account to log on to the computer. 
  2. Select Start, press and hold (or right-click) Computer > Properties.
  3. Select Change settings next to the computer name.
  4. On the Computer Name tab, select Change.
  5. Under the Member of heading, select Workgroup, type a workgroup name, and then select OK.
  6. When you are prompted to restart the computer, select OK.
  7. On the Computer Name tab, select Change again.
  8. Under the Member of heading, select Domain, and then type the domain name.  
  9. Select OK, and then type the credentials of the user who has permissions in the domain.
  10. When you are prompted to restart the computer, select OK.
  11. Restart the computer.

Rejoin the computer to the domain by running a script 

You can run a script to rejoin the computer to the domain. Run the following script on the machine where the issue has occurred using local admin privileges,

  1. Copy and paste the below script to a text file and name it with .ps1 extension. 

    $credential = Get-Credential

    $serverstr = Read-Host - Prompt 'Enter domain name'

    Reset-ComputerMachinePassword -Credential $credential -Server $serverstr

  2. Run the script with local admin privileges using powershell 3.0 or above. 
  3. After you run the script, enter the domain admin credentials with privileges to change user password.
  4. In the powershell command prompt, specify your domain name and press enter. Script will get executed now.  

Access workstation using it's local account

If you do not want to rejoin the machine to the domain or if the rejoining fails, you can try accessing the workstation machine using it's local account. 

Keywords: Trust relationship failed, rejoin computer to domain.