VMoreCloud › Windows Server 2022 › Active Directory › RODC Account Security
WINDOWS SERVER 2022 • ACTIVE DIRECTORY • AZ-802 LAB

Manage RODC Account Security: Cached Credentials and Password Reset

How a Read-Only Domain Controller decides which passwords to cache, how to audit and change that policy, how to purge exposed credentials, and how to reset the RODC’s krbtgt and computer account passwords without breaking authentication.

Author: Khurram Shahzad
Platform: Windows Server 2022
Technology: Active Directory Domain Services
Management: PowerShell, repadmin & dsa.msc
Level: Advanced
Reading Time: 22 minutes

An RODC is only as safe as the passwords it caches

The whole point of an RODC is that a stolen server exposes little. That holds only if the Password Replication Policy stays tight and you know exactly what is cached. In this lab the writable DC is server.vmorecloud.com at 192.168.91.129.

PRP
What this tutorial coversThe credential caching model, auditing and modifying the Password Replication Policy (PRP), inspecting and purging cached accounts, resetting krbtgt_XXXXX and the RODC computer account password, handling a compromised RODC, hardening, and common mistakes.
Corrections to common adviceThere is no Set-ADDomainControllerPasswordReplicationPolicy cmdlet. The ActiveDirectory module provides Get-, Add- and Remove-ADDomainControllerPasswordReplicationPolicy and Get-ADDomainControllerPasswordReplicationPolicyUsage. Commands were not run against your forest, so test them in a lab first.
01

Deny always wins

An account in any denied list is never cached, even if it is also allowed.

02

Cached means exposed

Denying an account later does not reliably erase a secret that is already cached. Reset it.

03

Rebuild when unsure

If you cannot bound the exposure, delete and redeploy the RODC rather than patching it.

The security model

An RODC stores no account secrets by default, apart from its own computer account and its own krbtgt_XXXXX account. Another account’s secret is copied to it only when that account authenticates to that RODC and the PRP allows it.

Attribute on the RODC computer objectMeaning
msDS-RevealOnDemandGroupAllowed list: accounts whose secrets may be cached
msDS-NeverRevealGroupDenied list: accounts that are never cached
msDS-AuthenticatedToAccountListAccounts that have authenticated to this RODC
msDS-RevealedListAccounts whose secrets are currently cached
msDS-KrbTgtLinkLink to this RODC’s own krbtgt account

The default policy is restrictive on purpose:

  • The Allowed RODC Password Replication Group is empty, so nothing is cached until you decide.
  • The Denied RODC Password Replication Group holds Domain Admins, Enterprise Admins, Schema Admins, Cert Publishers, Group Policy Creator Owners, Domain Controllers, Read-only Domain Controllers and the domain krbtgt.
  • Each RODC also denies the built-in Administrators, Server Operators, Backup Operators and Account Operators.

A stolen RODC therefore exposes only the secrets you chose to cache.

Requirements and placeholders

  • A standard forest with at least one writable DC, here server.vmorecloud.com at 192.168.91.129
  • Domain Admin or equivalent rights, working from a writable DC with the ActiveDirectory module
  • An existing RODC to manage
PlaceholderWhat to substitute
<RODC-NAME>The RODC computer name, for example RODC1.
<BRANCH-ALLOWED-GROUP>The security group whose members may be cached on this RODC.
<DOMAIN-ADMIN>A Domain Admins account, for example vmorecloud\Administrator.

Set these variables once at the start of every session:

$Rodc     = "<RODC-NAME>"
$Dc       = "server.vmorecloud.com"
$DomainDN = (Get-ADDomain).DistinguishedName

Audit the Password Replication Policy

1

Review the allowed and denied lists

Get-ADDomainControllerPasswordReplicationPolicy -Identity $Rodc -Allowed
Get-ADDomainControllerPasswordReplicationPolicy -Identity $Rodc -Denied

# repadmin equivalents
repadmin /prp view $Rodc Allowed
repadmin /prp view $Rodc Denied

GUI path:

dsa.msc → Domain Controllers → RODC → Properties → Password Replication Policy
2

See what is cached and who has authenticated

# Secrets currently stored on the RODC
Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity $Rodc -RevealedAccounts

# Accounts that have authenticated to the RODC (not necessarily cached)
Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity $Rodc -AuthenticatedAccounts

# repadmin equivalents
repadmin /prp view $Rodc Reveal
repadmin /prp view $Rodc Auth2

In dsa.msc, open Advanced on the Password Replication Policy tab. It lists revealed and authenticated accounts and has a button to reset their passwords.

What to look for: any privileged account, service account or Domain Admin in the revealed list means the policy has failed. Authenticated-but-not-revealed accounts are the ones a loose allow list would cache next.

Modify the policy and purge cached credentials

3

Change the allowed and denied lists

# Per-RODC allowed group (preferred over the domain-wide Allowed group)
Add-ADDomainControllerPasswordReplicationPolicy -Identity $Rodc -AllowedList "<BRANCH-ALLOWED-GROUP>"
Remove-ADDomainControllerPasswordReplicationPolicy -Identity $Rodc -AllowedList "<OLD-GROUP>"

# Extra denied accounts for this RODC only
Add-ADDomainControllerPasswordReplicationPolicy -Identity $Rodc -DeniedList "svc-backup"

# repadmin equivalent (the group is passed by distinguished name)
$grp = (Get-ADGroup "<BRANCH-ALLOWED-GROUP>").DistinguishedName
repadmin /prp add $Rodc Allow $grp

Use -DeniedList for exceptions on one RODC. To block an account on every RODC, add it to the Denied RODC Password Replication Group.

4

Pre-cache an account that must log on offline

repadmin /rodcpwdrepl $Rodc $Dc "CN=user1,CN=Users,$DomainDN"

Only do this for accounts that are in the allowed list and not in any denied list.

5

Prevent and purge: treat a cached secret as exposed

  • Prevent: add the account to the RODC’s denied list, or to the Denied RODC Password Replication Group.
  • Purge: removing an account from the allowed list, or denying it, does not reliably evict a secret that is already cached. Reset the password on a writable DC, then confirm with -RevealedAccounts.
# Review the list first. This resets every revealed user, which is disruptive.
Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity $Rodc -RevealedAccounts |
  Where-Object objectClass -eq 'user' | ForEach-Object {
    Set-ADAccountPassword -Identity $_ -Server $Dc -Reset `
      -NewPassword (Read-Host "New password for $($_.Name)" -AsSecureString)
    Set-ADUser -Identity $_ -Server $Dc -ChangePasswordAtLogon $true
  }

# Check again
Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity $Rodc -RevealedAccounts
Computer accountsCached computer accounts lose their secure channel when reset this way. Run Reset-ComputerMachinePassword -Server $Dc -Credential <DOMAIN-ADMIN> on the member, or rejoin it.

Reset the RODC passwords

The krbtgt_XXXXX account

Every RODC has its own Kerberos account, krbtgt_XXXXX, referenced by msDS-KrbTgtLink. Resetting it affects only tickets issued by that RODC. It does not touch other RODCs or the domain krbtgt.

6

Check the starting state

repadmin /replsummary
repadmin /showrepl $Rodc
nltest /dsgetdc:vmorecloud.com /force

Make sure the RODC reaches a writable DC and replication shows no failures before you change anything.

7

Reset krbtgt_XXXXX on a writable DC

$krb = (Get-ADComputer $Rodc -Properties msDS-KrbTgtLink).'msDS-KrbTgtLink'
Add-Type -AssemblyName System.Web
$pw  = ConvertTo-SecureString ([System.Web.Security.Membership]::GeneratePassword(64,10)) -AsPlainText -Force
Set-ADAccountPassword -Identity $krb -Server $Dc -Reset -NewPassword $pw

# Replicate and verify
repadmin /syncall $Dc /AdeP
repadmin /replsummary
dcdiag /s:$Rodc /v

Impact: tickets issued by that RODC become invalid, so clients silently re-authenticate. Expect a short blip, longer if the WAN is down. Test a branch logon through the RODC afterwards.

Suspected compromise: after replication completes, reset it a second time. This mirrors the guidance for the domain krbtgt: the second reset invalidates tickets signed with the previous key. Verify the behaviour in your lab.

The RODC computer account

8

Reset the computer account password

The RODC needs a reachable writable DC to change its own computer account password, so only do this while the WAN link is up. Run on the RODC in an elevated prompt:

Stop-Service kdc
netdom resetpwd /server:server.vmorecloud.com /userd:vmorecloud\<DOMAIN-ADMIN> /passwordd:*
Restart-Computer

Verify after the restart:

nltest /sc_verify:vmorecloud.com
repadmin /replsummary
dcdiag /s:$Rodc

If this fails, a mismatched secret breaks replication and the RODC cannot authenticate to its partners. Repair the secure channel from a writable DC or rebuild the RODC. Verify this procedure in your lab before using it in production.

RollbackNeither reset can be undone. Never restore a domain controller from a VM snapshot, because that causes a USN rollback. Always keep out-of-band access (console or iLO) to the RODC before you start.

A compromised RODC: reset or rebuild

SituationAction
Suspected, short and bounded exposure, no root accessReset cached accounts and krbtgt_XXXXX (twice), then monitor
Server stolen, physically tampered with, or root-compromisedDelete the RODC and redeploy
You cannot establish when the exposure startedDelete the RODC and redeploy
9

Decommission and redeploy

  1. Isolate the RODC and power it off.
  2. Export what it cached:
    Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity $Rodc -RevealedAccounts |
      Export-Csv C:\rodc-revealed.csv -NoTypeInformation
    Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity $Rodc -AuthenticatedAccounts |
      Export-Csv C:\rodc-authenticated.csv -NoTypeInformation
  3. In dsa.msc, delete the RODC computer account from the Domain Controllers OU. The dialog offers to reset passwords for the user and computer accounts cached on it. Tick both. Deleting the account also removes its krbtgt_XXXXX.
  4. Clean up DNS records and stale metadata, and remove the server from its site.
  5. Check that no privileged account appears in the export. If one does, reset it and investigate.
  6. Redeploy with a staged installation, so a fresh RODC with a new krbtgt_XXXXX replaces it.

Hardening recommendations

  • Allowed group: one group per RODC with branch users and computers only. Keep tier-0 and privileged service accounts out. Never use Domain Users or Authenticated Users, and add nothing to the domain-wide Allowed group.
  • Privileged accounts: keep admin groups in the denied list, place admins in Protected Users and do not let them sign in to branch machines. Test branch applications for Kerberos-only behaviour first.
  • Physical placement: locked room, BitLocker with TPM, Server Core and no extra roles.
  • Network placement: firewall rules that allow traffic only to hub DCs, a dedicated branch subnet and a delegated non-Domain-Admin administrator.

Enable the matching audit subcategories, then monitor these events:

Event IDWhat it tells you
4732Membership added to a security-enabled local group, including the Allowed and Denied RODC groups
5136Change to msDS-RevealOnDemandGroup or msDS-NeverRevealGroup (needs Audit Directory Service Changes)
4742The RODC computer object was changed
4723, 4724Password change or reset on a cached account
4768, 4769, 4771, 4776Authentication spikes or failures at the branch

Common mistakes

Broad allow lists

Adding Domain Users, Authenticated Users or admin groups to the Allowed group, or editing the default Denied group. Use a per-RODC group with named branch accounts.

Assuming denial purges

Denying an account does not erase a secret that is already cached. Reset the password on a writable DC and re-check -RevealedAccounts.

Resetting while offline

Changing krbtgt_XXXXX or the computer password when the RODC cannot replicate leaves it out of sync. Confirm the link first.

Snapshot restores

Reverting a DC VM to a snapshot causes a USN rollback. Rebuild instead.

Deleting without resetting

Removing the RODC account without resetting the cached accounts leaves their exposed secrets valid.

Admins at the branch

A Domain Admin signing in at a branch machine can leave Kerberos tickets and other artefacts there. Use separate, non-privileged branch admin accounts.

Variations in your environment

FactorHow the procedure changes
Domain functional levelWindows Server 2022 supports RODCs on older levels. If you restrict RC4, check how the RODC krbtgt behaves in your environment.
Number of RODCsEach RODC has its own krbtgt, PRP and cache. Audit and reset them one at a time.
Branch with unreliable WANPre-cache the staff who must log on offline, and schedule resets for when the link is stable. Do not reset the machine password during an outage.
Hub-and-spoke site linksBefore any reset, confirm the RODC’s site has a link to a hub site with a writable DC.

Frequently asked questions

Does removing an account from the allowed list remove its cached password?

Not reliably. Treat the cached secret as exposed and reset the password on a writable DC.

Can I edit the PRP from the RODC itself?

No. Manage it from a writable DC with Domain Admin rights. A delegated RODC administrator cannot change the PRP.

Does resetting an RODC’s krbtgt affect other domain controllers?

No. Each RODC has its own krbtgt account, so a reset only invalidates tickets issued by that RODC.

Should branch computers be cached?

If branch machines must start up and authenticate while the WAN is down, their computer accounts must be allowed and cached. Add them to the per-RODC allowed group.

Conclusion

You can now see what an RODC caches, tighten the policy that controls it, purge exposed secrets, reset its own accounts safely and decide when to rebuild it. Use this checklist after any change.

RODC security checklist
  • Allowed list contains only a per-RODC branch group with no tier-0 or privileged accounts
  • Denied list still includes Administrators, Server Operators, Backup Operators, Account Operators and the Denied RODC Password Replication Group
  • -RevealedAccounts shows no privileged or service accounts
  • krbtgt_XXXXX and machine password resets were done while replication was healthy, then verified with repadmin and dcdiag
  • Audit events 4732, 5136, 4742 and the authentication events are collected and reviewed
  • RODC is physically secured, uses BitLocker and is reachable only from hub DCs
  • Delegated administrator is not a Domain Admin
  • A rebuild plan exists, and no domain controller is ever restored from a VM snapshot

Next: manage FSMO roles

Continue the AZ-802 lab series with viewing, transferring and seizing FSMO roles on VMoreCloud.

Khurram Shahzad, Hybrid Cloud & Virtualization Engineer and author at VMoreCloud
👤 About the Author
Khurram Shahzad
Hybrid Cloud & Virtualization Engineer
Hybrid Cloud & Virtualization Engineer specializing in VMware (VCF, vSAN, Aria), Microsoft Azure, AWS, Windows Server, Microsoft 365, Entra ID, Intune, Linux, Nutanix, Proxmox, networking, backup & disaster recovery, Cisco and FortiGate. I share practical technical guides, infrastructure projects and insights to help IT professionals build and manage modern IT environments through VMoreCloud.
🖥️ VMware🔷 Azure☁️ AWS🪟 Windows Server🐧 Linux🗄️ Virtualization🛡️ Cybersecurity🔗 Networking💾 Backup & DR✖️ Nutanix🟠 Proxmox
📄
120+
Articles Published
👥
10K+
Readers
🎓
Learning & Sharing
A Stronger Tech Community
View all articles →
“Learn  |  Build  |  Share”
☁️ VMoreCloud|Tech Knowledge for a Better Tomorrow
IT  •  Cloud  •  Virtualization  •  Security  •  Open Source

Technical note: commands were written for Windows Server 2022 in the vmorecloud.com lab. Test in a lab before production and replace all highlighted placeholders with your own values.

Leave a Reply

Your email address will not be published. Required fields are marked *