Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Replication error -2146893022 "The target principal name is incorrect": DC password and name mismatch

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Error -2146893022 (hex 0x80090322, SEC_E_WRONG_PRINCIPAL) means the source domain controller could not decrypt the Kerberos service ticket the destination domain controller presented to it (Microsoft Learn, error -2146893022). The destination is the domain controller asking for changes. The ticket was either encrypted with an old copy of the source's password, or it was sent to the wrong server altogether.

This is a different problem from a member server losing its trust relationship. Between domain controllers, the Key Distribution Center (KDC) on each domain controller is part of the chain, and the fastest fix works by changing which KDC issues the ticket.

What you see

  • dcdiag fails the Replications test: "The replication generated an error (-2146893022): The target principal name is incorrect."
  • repadmin /showrepl, /showreps, /replsum and /syncall report -2146893022 (0x80090322).
  • Replicate now in Active Directory Sites and Services fails with "The target principal name is incorrect".
  • The Directory Service log has NTDS KCC events 1925 or 1308, or event 1926, citing the same status.

Why it happens

The error code is not an Active Directory error. It is passed up from lower layers (RPC, Kerberos, SSL, LSA, NTLM), and on the wire it is usually the Kerberos error KRB_AP_ERR_MODIFIED or KRB_AP_ERR_NOT_US. Microsoft lists four root causes (Microsoft Learn, error -2146893022):

  1. Password mismatch (the top cause). The KDC that issued the ticket holds an older version of the source domain controller's computer account password than the source itself. Replication failures are what leave a KDC with a stale password.
  2. Bad name-to-IP mapping. A DNS record, WINS entry or hosts file points the destination at the wrong server, perhaps a domain controller in another forest or another domain controller in the same domain. Stale NTDS Settings objects cause the same effect.
  3. The KDC cannot find the source domain controller's service principal name (SPN), or the SPN is missing or duplicated, often from simple replication delay after a promotion.
  4. Kerberos data altered in transit by network hardware, software or an attacker.

Each domain controller is its own KDC for its domain and prefers to get tickets from itself, but it may use another domain controller. That is why a destination that fetched a ticket from a lagging KDC can fail while others succeed.

How to prove the cause

All of these checks are read-only.

1. Check the SPNs on the source. On the console of each source domain controller that fails outbound replication with this error:

dcdiag /test:checksecurityerror

To check SPN registration against a specific domain controller, add replsource:<remote DC>. It reports missing or duplicate SPNs.

2. Check that the name resolves to the right server. On the source, note its IP address (ipconfig /all) and its DSA object GUID (the header of repadmin /showreps). On the destination, run repadmin /showreps and confirm the DSA object GUID it lists for that source matches. Then, for every DNS server the destination uses:

nslookup -type=CNAME <source DSA object GUID>._msdcs.<forest root DNS name> <DNS server IP>
nslookup -type=A+AAAA <FQDN of source DC> <DNS server IP>

The address returned must be the source's current address, with no duplicate host records. Also check %systemroot%\system32\drivers\etc\hosts on the destination for entries naming the source domain controller.

Microsoft notes that a request sent to a server that is not a domain controller returns error 1753 instead. So when a wrong mapping is behind -2146893022, the wrong server is likely to be another domain controller.

3. Find which KDC the destination is using. Run this at an elevated prompt soon after a failure:

nltest /dsgetdc:<DNS domain of target domain> /kdc

A network trace is the definitive answer.

4. Compare password versions. Look for obvious version differences in the password attributes (dBCSPwd, UnicodePWD, NtPwdHistory, PwdLastSet, lmPwdHistory) of the source's computer account:

repadmin /showobjmeta <source DC> <DN of source DC computer account>
repadmin /showobjmeta <KDC used by destination DC> <DN of source DC computer account>

Different versions confirm a password mismatch.

5. Check time while you are there. Microsoft's general Kerberos guidance is that clocks must be within five minutes of the domain controllers (Microsoft Learn, Kerberos troubleshooting). A large skew usually shows up as KRB_AP_ERR_SKEW, but it is cheap to rule out.

The fix

Password mismatch: make the destination use itself as KDC

Microsoft's top resolution is to stop the destination's KDC briefly, so it gets a ticket from another domain controller with the current password, then restore it (Microsoft Learn, error -2146893022):

  1. On the destination domain controller, disable the KDC service, then restart the domain controller:

    Set-Service -Name KDC -StartupType Disabled
    
  2. Trigger replication from the source (Sites and Services, or):

    repadmin /replicate <destination DC> <source DC> "<DN of domain partition>"
    
  3. Set the KDC back to automatic and start it:

    Set-Service -Name KDC -StartupType Automatic
    Start-Service -Name KDC
    

Do not leave the KDC disabled. Microsoft's own steps restore it straight after the replication succeeds.

As an alternative, Microsoft documents purging the system account's Kerberos tickets without a restart, so the next request fetches a new ticket:

klist -li 0x3e7 purge

If that does not work: reset the source's machine password

On the console of the domain controller whose password needs resetting, at an elevated prompt:

netdom resetpwd /server:<DC to direct the password change to> /userd:<domain\admin user> /passwordd:*

With *, netdom prompts for the password rather than taking it on the command line (Microsoft Learn, netdom resetpwd). Then replicate again.

Name mapping problems

  • Remove any hosts entries for the source domain controller, then clear the caches with ipconfig /flushdns and nbtstat -R.
  • Correct or delete wrong or duplicate host (A/AAAA) records and the _msdcs alias record on every DNS server the destination uses.
  • Remove stale NTDS Settings objects left by domain controllers that no longer exist (metadata cleanup).

Duplicate or missing SPNs

Fix what dcdiag /test:checksecurityerror reports. Missing SPNs after a promotion are often just replication delay and resolve once replication of that change completes.

How to confirm the fix

  • repadmin /replicate from the source completes without error, and repadmin /showrepl shows a fresh last success.
  • repadmin /replsum lists no -2146893022 for any partner.
  • dcdiag /test:replications and dcdiag /test:checksecurityerror pass.
  • The KDC service is running and set to Automatic on the destination.

What to watch afterwards

  • The replication failure that started it. A KDC holds a stale password because it was not replicating. Find and fix that original fault, or the error returns at the next password change.
  • DNS hygiene. Domain controllers should register their own records; static records or hosts entries for domain controllers cause this error again after an address change.
  • Retired domain controllers. Clean up metadata whenever a domain controller is removed without a normal demotion, so no stale NTDS Settings object is left for others to replicate from.

Risks and limits

  • Disabling the KDC means that domain controller stops issuing Kerberos tickets until it is re-enabled. Do it on one domain controller at a time while others are available, and re-enable it promptly.
  • Microsoft lists tampering with Kerberos data in transit as a possible cause. If name, password and SPN checks are all clean, treat a network device or security product in the path as a suspect, and consider whether the traffic has been altered deliberately.
  • The checks above are written for same-forest replication. Cross-forest referrals add another KDC to the chain.

Sources

Next step

When domain controllers disagree about passwords, there is almost always an older replication fault behind it. If you want both fixed and replication monitored afterwards, NetLeverage has looked after business servers since 2002. Talk to us through managed support with the output of repadmin /showrepl from the failing domain controller.