Active Directory Secure Channel / Domain Trust Issues After Server Restore – Windows Server 2019

I’m troubleshooting what appears to be an Active Directory secure-channel or domain trust issue and would appreciate input from anyone who has dealt with something similar.

Environment

  • Domain: Internal Active Directory domain (name omitted)
  • Domain Controller: Windows Server 2019 Essentials
  • Domain Controllers: One
  • DNS: Active Directory-integrated DNS hosted on the domain controller
  • Backup software: NinjaOne Backup
  • Recovery method: Restored the server from backup using a clone restore
  • Affected workstation: Windows domain-joined workstation

The issue appeared in the context of restoring the domain controller from backup. I’m trying to determine whether the restore process, AD metadata, DNS, or computer account passwords could be involved.

Symptoms

On an affected workstation, running:

nltest /sc_verify:<domain-name>

Returns:

Flags: 40000080
Trusted DC Name
Trusted DC Connection Status Status = 5 0x5 ERROR_ACCESS_DENIED
Trust Verification Status = 5 0x5 ERROR_ACCESS_DENIED
The command completed successfully

The command itself completes, but secure-channel verification reports Access Denied.

What I’ve checked so far

1. Workstation DNS configuration

The workstation is configured to use the domain controller for DNS. Its primary DNS suffix matches the Active Directory domain.

2. Domain controller health

Ran DCDIAG against the domain controller.

The following tests passed:

  • Connectivity
  • Advertising
  • DFSREvent
  • SysVolCheck
  • KccEvent
  • KnowsOfRoleHolders
  • MachineAccount
  • NCSecDesc
  • NetLogons
  • ObjectsReplicated
  • Replications
  • RidManager
  • Services
  • SystemLog
  • VerifyReferences
  • LocatorCheck

There is only one domain controller in this environment, so there is no second DC to compare against.

3. DNS diagnostics

dcdiag /test:dns /v reports a DNS delegation problem:

Delegated domain name: _msdcs.<domain-name>.

Error:
DNS server: <old-server-name>.
IP: <Unavailable>
[Missing glue A record]

Further investigation revealed:

  • The actual _msdcs DNS zone has an NS record pointing to the current domain controller.
  • However, the _msdcs NS record in the parent domain zone still points to an old server hostname.
  • That old hostname no longer resolves in DNS.
  • The current domain controller’s DNS records and AD-integrated zones otherwise appear to be present.

This appears to be a stale DNS delegation left over from an older server name.

4. DNS forwarders

DCDIAG also reported two unreachable DNS forwarders. A public DNS forwarder passed its tests.

Questions for the community

  1. Could an incorrect _msdcs delegation cause nltest /sc_verify to return ERROR_ACCESS_DENIED, or is that error more indicative of a computer account password mismatch?
  2. Could restoring a domain controller using NinjaOne Backup’s clone restore cause an AD database, invocation ID, USN, or computer account password inconsistency?
  3. Is there anything specific I should verify after restoring a domain controller from a clone-based backup, especially when it is the only DC in the domain?
  4. Would you recommend correcting the stale _msdcs delegation first and then retesting the secure channel, or investigating the workstation’s computer account password first?
  5. Are there particular Event Viewer logs or event IDs I should examine on the DC to identify whether this is an AD authentication, Netlogon, Kerberos, or DNS issue?
  6. What is the safest way to test the secure channels of all domain-joined workstations without unnecessarily resetting computer accounts or disrupting users?
  7. Are there any additional PowerShell commands or diagnostic tools you would recommend before attempting to repair the secure channel?

What I’m trying to avoid

I don’t want to start removing/rejoining computers to the domain or resetting computer accounts until I understand whether the underlying issue is DNS, AD, or something related to the server restore.

I’d especially appreciate input from anyone who has recovered a Windows Server 2019 domain controller using NinjaOne Backup or another image/clone-based backup solution.

Thanks!

This is a machine account password mismatch from the restore, not DNS. DNS problems give you “no logon servers.” ACCESS_DENIED means it found the DC and got rejected.

Restoring the DC rolled AD back to the backup date. Workstations rotate their machine password every 30 days and keep the previous one, so anything that rotated twice since the backup no longer matches. User password changes since then got reverted too. USN rollback isn’t really a concern with one DC.

Fix the _msdcs delegation anyway since it’s stale, but it won’t solve this.

To confirm, check the DC’s System log for Netlogon 5722. It lists every machine failing to authenticate, so you can find all affected PCs without touching them:

Get-WinEvent -FilterHashtable @{LogName='System';ProviderName='NETLOGON';Id=5722}

On the client side you’ll see 3210 or 5719.

To fix a machine without rejoining, run this as local admin:

Test-ComputerSecureChannel -Repair -Credential DOMAIN\admin

No reboot or profile loss. nltest /sc_reset won’t fix it.

Also make sure the old server or clone isn’t still on the network somewhere.

Note: The real fix is a second DC. With two, you never restore AD from an image. You rebuild or demote the broken one and let it replicate from the healthy one, so nothing gets rolled back.

With a single DC, any restore is a rollback. You can only limit the damage

1 Like

Active Directory domain controllers cannot be restored from a simple backup (clone, snapshot, etc.). I think you may have tombstoned your DC as a result. This is by design.

This is why you always have at least two DC’s. FSMO roles can be forcibly reclaimed by another DC if the current FSMO role holder is down. And then to ‘restore’ the bad DC, you just build a new DC server and promote it into a full fledged DC again, using the healthy DC as its replication source.

There is a registry key you can apply to bring it back into proper service. It’s not a supported resolution, but you’re past that now. (Unless you have proper AD backups you can apply?)

You can Google the details. We had to do it once after a storage incident in a non-prod domain triggered both DC’s to tombstone. But it was a long time ago. I can’t remember if there’s a requirement to have two DC’s or not.