Monday 9 September 2013

The trust relationship between this workstation and the primary domain failed(resolved)




The "the trust relationship between this workstation and the primary domain failed" occurs

(1) If you are trying to login with any computer that has not connected to your domain since long time

(2) You have multiple domain controllers and have replication issues between them.

(3) one of your domain controllers is down currently which has the password of this computer object.

 If you resolve the replication issue, then you should not face this error anymore.
How to resolve?
First run the following command on effected computer facing above error.
nltest /dsgetdc:domain.local

it will show you that on which domain controller your system is trying to be authenticated at the moment, as you have multiple domain controllers.
 Now go to that Domain controller and check the password reset date of this effected computer

As below:

(Go to AD user and computer and from view select Advance feature and search the effected system object and note its path/location where it is placed and then go on that path/location and right click on the effected computer object and go to its properties and then attribute editor tab and there you will find the pwdLastSet attribute).
it will show you that when the password of this computer object was set.
most probably it will be an old date.

now you have to reset the password of this computer object through the following command, should be run from that effected computer.(if you can not login with domain user then can login with any local users)

netdom resetpwd /s:DomainControler1 /ud:domain\user1 /pd:*

 

The above command will reset the password of the effected computer and will replicate to the domain controller.

Note:- on client OS (Windows 7 etc) you have to install remote server administration tools, otherwise you will receive an error while running the above command.

Now restart this affected computer and try to login with domain user it should login now without any error.