logo
search
Others

Fix 'File Already Exists' Error When Creating a Two-Way Trust Between Domain Controllers

Nimra MalikNimra Malik Oct 13, 2026 868 views

Question details

The user needs to establish a two-way trust relationship between two primary domain controllers but is blocked by a file existence error.

How to Fix the 'File Already Exists' Error During Domain Controller Two-Way Trust Setup
Product
Windows Server Active Directory
Device & OS
not provided
Scenario
Attempting to create a two-way trust relationship between two distinct Active Directory domains to allow cross-domain resource access.
Observed behavior
The setup process fails, displaying an error message that indicates 'the file already exists', preventing the trust from being successfully created.
Before you start

Ensure you have Enterprise Admin or Domain Admin privileges in both domains, and always create a system state backup of your Active Directory before making structural changes.

Solution 1Recommended

Clear Stale Active Directory Trust Objects

Use this solution to remove remnants of previous, failed, or improperly removed trust relationships that trigger the 'file already exists' conflict.

When a trust relationship is deleted improperly or a previous setup attempt fails, hidden Trusted Domain Objects (TDOs) can be left behind in the Active Directory System partition. These remnants conflict with new trust configurations.

1
Open AD Domains and Trusts

Log into your Primary Domain Controller, open 'Active Directory Domains and Trusts' from the Administrative Tools, and check if any broken trust relationships are currently listed. If they are, right-click and remove them.

2
Use ADSI Edit for Deep Cleanup

If no trust is visible in the GUI, open 'ADSI Edit' (adsiedit.msc). Connect to the 'Default naming context' and expand your domain.

3
Locate the System Container

Navigate to 'CN=System'. Look for objects of type 'trustedDomain' that match the name of the domain you are trying to trust.

4
Delete Stale TDOs

Carefully delete these orphaned 'trustedDomain' objects. Repeat this process on the Primary Domain Controller of the other domain, then restart the Netlogon service on both servers.

Clear Stale Active Directory Trust Objects
Caution with ADSI Edit: ADSI Edit is a powerful tool. Deleting the wrong objects can cause severe damage to your Active Directory. Proceed with caution and ensure backups are available.
Free Microsoft Office alternative

Document Your Server Configurations with WPS Office

While resolving Active Directory trust issues requires native Windows Server tools, IT professionals need a reliable suite for maintaining system documentation, network diagrams, and server logs. WPS Office offers a lightweight, robust, and free alternative to standard office software.

Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx)Lightweight installation ideal for IT admin jump servers and resource-constrained workstationsBuilt-in advanced PDF toolkit for compiling, securing, and sharing network documentationFamiliar tabbed user interface for effortless multitasking across IT reports
microsoft office alternative - wps office

Frequently Asked Questions

Which firewall ports must be open to establish a two-way domain trust?

To successfully establish and maintain a domain trust, you must allow traffic over DNS (TCP/UDP 53), Kerberos (TCP/UDP 88), RPC Endpoint Mapper (TCP 135), RPC Dynamic Ports (TCP 49152-65535), LDAP (TCP/UDP 389), and SMB (TCP 445) between both domain controllers.

Why does the system say a trust file already exists when I cannot see one in the GUI?

This typically occurs if a previous trust was forcefully or improperly removed. The graphical interface may no longer display the trust, but the underlying Trusted Domain Object (TDO) still exists hidden within the Active Directory 'System' container.

Can I create a two-way trust if the domain controllers cannot ping each other by name?

No, successful DNS name resolution is a strict prerequisite for Active Directory trusts. You must configure conditional forwarders or stub zones in your DNS settings so both domains can resolve each other's Fully Qualified Domain Names (FQDN) before running the trust wizard.