Join our Newsletter — 33% off our NHI Course
Home› Guides› DSRM Account Security: Protecting the Restore Mode Password…
Guide Identity & Access Management (IAM)

DSRM Account Security: Protecting the Restore Mode Password on Every Domain Controller

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 12 min read
On this page

Every Active Directory domain controller has a local administrator account that most organisations set once at promotion and then forget: the Directory Services Restore Mode (DSRM) administrator. It exists so that a domain controller can be repaired when the directory itself is unavailable, which makes it essential for recovery. It is also a privileged credential that sits outside normal domain password policy, and a configuration change can make it usable for logon at any time. That combination makes it both a recovery dependency and a persistence risk.

This guide covers what the DSRM account is, how the logon behaviour setting changes its risk, how to set and rotate the password on every domain controller, how to monitor it, and how to keep it usable for recovery. It is defensive guidance for directory, identity and security operations teams. For the wider recovery process, see the Identity Recovery Guide.

Key takeaways

  • The DSRM administrator is a local account on each domain controller, set by a Domain Admin at promotion and then often never changed.
  • The DsrmAdminLogonBehavior registry value controls whether the account can be used outside restore mode. Microsoft documents that value 2 (logon at any time) is not recommended.
  • Treat any change to that value, and every DSRM password change (event 4794), as an alert.
  • Use a unique DSRM password per domain controller, and at minimum keep read-only domain controllers separate from writable ones.
  • Store and rotate DSRM passwords through a managed process, such as Windows LAPS, which Microsoft documents can back up DSRM passwords to Active Directory.
  • Test the password. A DSRM password nobody can retrieve during an outage is not a recovery path.

What the DSRM account is and why it matters

Directory Services Restore Mode is a special start-up mode in which a domain controller runs without the Active Directory database online, so that it can be restored or repaired. Because domain accounts depend on that database, logon in DSRM uses a separate local administrator account and password stored on the domain controller itself.

Microsoft's support article on resetting the DSRM administrator password notes that a member of the Domain Administrators group sets the DSRM password during domain controller promotion. In practice that means:

  • The password was chosen by whoever promoted the server, possibly years ago, possibly by a contractor.
  • Many domain controllers in the same estate may share it, because build scripts reused it.
  • It is often not recorded anywhere reliable, or is recorded in an old document that many people can read.
  • Microsoft documents that the DSRM password is not checked against any password policy, so weak values are possible.

From an identity governance view, the DSRM account is a privileged, non-interactive, emergency credential: closer to a break-glass account than to a user account. It needs an owner, a storage location, a rotation schedule and monitoring, like any other privileged non-human credential. The Break-Glass Account Guide covers the general principles.

The DsrmAdminLogonBehavior setting

Microsoft's documentation for restartable AD DS describes a registry entry that controls when the DSRM administrator can log on while the domain controller is started normally:

HKLM\System\CurrentControlSet\Control\Lsa\DSRMAdminLogonBehavior

ValueBehaviour documented by Microsoft
0The DSRM administrator account cannot be used to log on; only domain accounts can log on. Documented as the default for Windows Server 2008.
1The DSRM administrator account can be used to log on only when the AD DS service is stopped. Documented as the default for Windows Small Business Server 2008, and suggested for single domain controller domains or isolated domain controllers.
2The DSRM administrator account can be used to log on at any time. Microsoft states this is not recommended because the DSRM administrator password is not checked against any password policy.

The same page states that the DSRM administrator account can always be used to log on to a domain controller started in DSRM, whatever this value says. The setting therefore controls only additional logon paths outside restore mode.

Why this matters for security: if the value is set to 2, a local administrator credential that bypasses domain password policy, and that is often shared and rarely changed, becomes usable on a running domain controller. Security researchers and detection rule authors widely treat an unexpected change to this value as a sign of persistence on a domain controller, which maps to MITRE ATT&CK T1112 Modify Registry and to the use of local accounts (T1078.003 Local Accounts).

NHI Mgmt Group recommendation:

  • Leave the value absent or set to 0 on all domain controllers unless there is a documented, approved operational reason.
  • Where value 1 is justified (for example a single isolated domain controller), record the exception, its owner and its review date.
  • Treat value 2 on any production domain controller as a security incident until proven otherwise.
  • Enforce the expected value through configuration management and report drift.

Setting and rotating the DSRM password

Microsoft documents the Ntdsutil procedure for resetting the DSRM administrator password:

  1. Open an elevated prompt and run ntdsutil.
  2. At the Ntdsutil prompt, type set dsrm password.
  3. Type reset password on server null for the local server, or reset password on server servername for another domain controller, and enter the new password when prompted.
  4. Type q twice to exit.

Microsoft notes the procedure cannot be used if the target server is running in DSRM, and that it works without restarting the server.

Synchronising from a domain account

An archived Microsoft Directory Services team article on DS restore mode password maintenance describes an Ntdsutil option, sync from domain account, that sets the DSRM password to match a nominated domain user's password. That article states the sync is not automatic and must be rerun after each change, and was written for Windows Server 2008 with a hotfix. An update to the article warns that sharing one DSRM password across all domain controllers and read-only domain controllers can enable lateral movement, and recommends per domain controller passwords where possible, and at minimum separate passwords for read-only domain controllers.

If you use synchronisation, protect the source domain account as a tier 0 credential, because anyone who can reset it can set the DSRM password on every domain controller that syncs from it. Prefer a unique password per domain controller.

Managing DSRM passwords with Windows LAPS

The Windows LAPS overview states that Windows LAPS can manage and back up the DSRM account password on Active Directory domain controllers, and that it offers access control lists and optional password encryption for passwords stored in Active Directory. Confirm the current requirements, such as encryption settings and supported operating system versions, in Microsoft's Windows LAPS documentation before deployment. Using a managed, per domain controller password with controlled read access addresses the most common weaknesses: shared, static, undocumented passwords.

For background on the two LAPS generations, see Legacy LAPS vs Windows LAPS.

Rotation triggers

Rotate DSRM passwords:

  • On a regular schedule set by your privileged access policy.
  • After any use of the account.
  • When anyone who knew or could read the password leaves or changes role.
  • After any suspected domain compromise, as part of the credential reset sequence alongside other tier 0 secrets, such as the krbtgt account.
  • After restoring a domain controller from backup, because the restored system may carry an old password.

Monitoring the DSRM account

Password changes: event 4794

Microsoft documents event 4794, "An attempt was made to set the Directory Services Restore Mode administrator password". It is generated every time the DSRM administrator password is changed, only on domain controllers, under the Audit User Account Management subcategory. Its fields include the subject's Security ID, Account Name, Account Domain and Logon ID, plus Caller Workstation (the computer from which the request was received) and Status Code (0x0 for success). Microsoft's monitoring recommendation is to always monitor 4794 events and trigger alerts when they occur.

Practical handling (illustrative):

  • Enable Audit User Account Management on domain controllers and forward Security logs centrally.
  • Alert on every 4794. Match it to an approved change or a LAPS rotation; anything else is investigated.
  • Check that Caller Workstation is an expected management host or the domain controller itself.
  • Use the Logon ID to correlate with the logon session (for example event 4624) that made the change.

Logon behaviour value changes

Monitor the DSRMAdminLogonBehavior value on every domain controller:

  • Configure registry auditing on the Lsa key value, or use your endpoint detection tooling's registry telemetry, and alert on creation or modification of the value.
  • Run a scheduled configuration compliance check that reads the value from every domain controller and reports anything other than the approved setting.
  • Include the check in domain controller build validation, so a new or restored domain controller cannot enter service with the wrong value.

Use of the account

Any logon with the DSRM account outside a planned recovery is significant. Alert on local account logons to domain controllers, and on domain controllers being restarted into DSRM outside approved maintenance windows. Correlate with change records.

Keeping DSRM usable for recovery

Hardening must not break recovery. The archived Microsoft article makes the point plainly: test backups and DSRM logon periodically, because a password you cannot use is no recovery path.

  • Retrieval in a crisis. If DSRM passwords are stored in Active Directory through Windows LAPS, plan for the case where Active Directory is unavailable. Keep an offline, access controlled escrow of the current passwords for at least the domain controllers you would restore first, and update it after rotation.
  • Two person control. Retrieval of a DSRM password should require approval and be logged.
  • Restore rehearsal. Include DSRM logon in forest recovery exercises, in an isolated environment.
  • Documentation. Record which domain controllers are designated for recovery, where their DSRM passwords are held and who can retrieve them.

The Identity Recovery Guide covers where DSRM fits in the forest recovery sequence.

Read-only domain controllers and branch sites

Read-only domain controllers are often placed in locations with weaker physical security. Microsoft's archived guidance specifically recommends that, at a minimum, read-only domain controllers have DSRM passwords separate from writable domain controllers. NHI Mgmt Group recommends going further: unique passwords on every read-only domain controller, value 0 for the logon behaviour setting, and the same 4794 and registry monitoring as for writable domain controllers.

Governance and ownership

  • Assign an owner for DSRM credentials, usually the directory services team, with security operations as the monitoring owner.
  • Include the DSRM account in your privileged account inventory for each domain controller, with last rotation date and storage location.
  • Restrict who can read DSRM passwords to a small tier 0 group, and review that group regularly.
  • Report on coverage: percentage of domain controllers with a unique, managed DSRM password, approved logon behaviour value and 4794 alerting.
  • Map the controls to NIST SP 800-53 account management and authenticator management requirements (AC-2, IA-5) and to audit logging (AU-2, AU-6).

For broader domain controller hardening, see the AD Domain Controller Hardening Guide.

A phased approach

Most estates cannot fix every domain controller in a single change window. A practical sequence:

  1. Discover. Read the logon behaviour value from every domain controller and confirm whether 4794 events are being collected. This is read-only and carries no outage risk.
  2. Contain. Remediate any domain controller with value 2, investigate why it was set, and switch on 4794 and registry change alerting.
  3. Rotate. Set new, unique DSRM passwords, starting with domain controllers designated for forest recovery and read-only domain controllers in exposed sites. Escrow each new password before moving on.
  4. Automate. Move to managed rotation, for example through Windows LAPS, and add the checks to domain controller build and restore procedures.
  5. Prove. Rehearse DSRM logon in an isolated recovery exercise and record the result as evidence for auditors.

Common failure patterns

  • Set once and forgotten. The DSRM password has not changed since promotion.
  • One password everywhere. All domain controllers, including read-only ones, share the same value.
  • Logon behaviour set to 2 on a production domain controller, with no record of why.
  • No 4794 alerting. The event is logged but nobody looks at it.
  • Stored only in Active Directory. The password cannot be retrieved when the directory is down.
  • Weak password. Because policy is not enforced, a simple value was accepted.
  • Sync source account under-protected. The domain account used for synchronisation is not treated as tier 0.
  • Restored domain controllers not re-checked for password age and registry value.

Practitioner checklist

  • Inventory every domain controller and record DSRM password age, uniqueness and storage location.
  • Check DSRMAdminLogonBehavior on every domain controller and remediate any value other than the approved one.
  • Enforce the approved value through configuration management and alert on drift.
  • Enable Audit User Account Management and alert on every event 4794.
  • Set unique DSRM passwords per domain controller, using Windows LAPS or an equivalent managed process.
  • Keep read-only domain controller DSRM passwords separate from writable domain controllers.
  • Maintain an offline, access controlled escrow for recovery, and update it after every rotation.
  • Rotate after use, staff change, suspected compromise and restore.
  • Rehearse DSRM logon in isolated recovery exercises.
  • Review who can read DSRM passwords at least quarterly.

Standards and references

Related NHI Mgmt Group resources: Identity Recovery Guide · AD Domain Controller Hardening Guide · Break-Glass Account Guide · krbtgt account

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 19 November 2026. Spotted an error? Use our contact page. General information only, not professional advice: see our Disclaimer.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.