If your office uses a Windows Server domain, sooner or later someone will try to sign in and see this message: “The trust relationship between this workstation and the primary domain failed.” Their password is correct, but Windows refuses to let them in. The message sounds alarming. In most cases the fix is quick, and nobody’s files are lost. This guide explains what has gone wrong, how to fix one affected PC safely, and when the error points to a bigger problem with the server.
What the error actually means
Every computer joined to a domain has its own account in Active Directory, just as each user does. That computer account has a password, which the PC and the domain controller change automatically in the background (every 30 days by default). The PC proves who it is with that password before it will accept domain sign-ins.
The error appears when the password stored on the PC no longer matches the one held by the domain controller. The PC can no longer prove who it is, so the domain refuses to trust it.
Common causes
- The PC was rolled back. A System Restore point, a restored disk image, or a virtual machine reverted to an old snapshot can bring back an out-of-date computer password.
- The PC was cloned. Copying one installed PC to another without preparing it properly (with Sysprep) can leave two machines sharing one identity.
- The computer account was changed in Active Directory. Someone deleted, reset or disabled it, sometimes during a clean-up of “old” computers that had not been used for a while.
- The domain controller was restored from an old backup. In that case many PCs can lose their trust at once.
- Reusing a computer name. Joining a new PC with the same name as an existing one can break the old machine’s account.
A laptop that has simply been away from the office for a few weeks usually does not have this problem on its own. It only changes its computer password when it can reach the domain. A long absence matters only if someone removed its account in the meantime.
Before you fix it: get signed in
To repair the trust you need to sign in to the PC with administrator rights. You can do that in one of two ways:
- a local administrator account on the PC (sign in as .\username, or COMPUTERNAME\username), or
- a domain account that has signed in on that PC before, using cached credentials. Unplug the network cable or turn off Wi-Fi first, so that Windows does not try to check with the domain controller.
If you use Microsoft LAPS, the local administrator password for the PC is stored in Active Directory or Entra ID. If you have no local admin account and no cached admin sign-in, don’t start resetting things. Get help first, because the wrong steps can lock you out of the PC completely.
Fix 1: repair the secure channel (no rejoin)
This is the least disruptive fix, and it usually works. Reconnect the network, then open PowerShell as administrator on the affected PC and run:
Test-ComputerSecureChannel -Verbose, which reports whether the trust is broken.Test-ComputerSecureChannel -Repair -Credential DOMAIN\adminuser, which resets the computer password using a domain admin account. Replace DOMAIN\adminuser with your own.
If it reports success, restart the PC and sign in with the user’s domain account as normal. An alternative is Reset-ComputerMachinePassword -Credential DOMAIN\adminuser, which does much the same job.
Fix 2: leave and rejoin the domain
If the repair fails, for example because the computer account was deleted, you can take the PC out of the domain and rejoin it. Go to Settings > System > About > Domain or workgroup (or run sysdm.cpl) and switch it to a workgroup. Restart, then join the domain again, keeping the same computer name, and restart once more.
Make sure you know the local administrator password before you leave the domain. Once the PC is in a workgroup, domain accounts can no longer sign in. Users’ local profiles normally stay where they are, and their files are not deleted by rejoining. Even so, it is sensible to copy anything important off the PC first, or check that it is in OneDrive or on the server. Don’t delete user profiles to “clean up” afterwards.
Check DNS and the clock
If the repair or rejoin fails with errors about not finding the domain, check two things:
- DNS: the PC must use your domain controller (or another internal DNS server) for DNS, not the broadband router or a public service. Run ipconfig /all and check the DNS servers listed.
- Time: domain sign-in uses Kerberos, which by default stops working if the PC’s clock differs from the domain controller’s by more than five minutes. Check the date, time and time zone on both.
When it is the server, not the PC
If several PCs show the error at the same time, stop fixing them one by one. Something has probably happened to the domain controller: it was restored from an old backup, a second domain controller has stopped replicating, or the server is failing. Repairing each PC can hide the real problem. Look at the server first. Check that it is up, that its RAID and disks are healthy, and that its event logs show no directory service errors.
Many small offices still run a single domain controller on one physical server. That makes the server’s health, and its backups, especially important. Our server repair service covers failed disks, RAID problems and servers that will not start. If a server failure has left data inaccessible, our data recovery team can help.
Talk to us
If the trust error keeps coming back, affects several machines, or you’re not sure who has the admin passwords, call us on 020 7237 4908 or get in touch. Servers and PCs can come to our Central London repair centre, or we can arrange courier collection anywhere in the UK. Evaluation is free, you get a fixed quote before work starts, and if we can’t fix it, there is no fee.