0XC0000371

0XC0000371 STATUS_NO_SECRETS - No Secret Material in Local Account Store

Windows Errors Intermediate 👁 4 views 📅 Jul 23, 2026

This error means Windows can't find the secret key for a local account. It usually happens after a failed password reset or domain join issue. Fix it by checking the SAM or re-creating the account.

Cause #1: The SAM Database Got Corrupted After a Password Reset

This is the most common reason you see 0XC0000371. You or a tool reset the password for a local account (like Administrator or a service account), but the change didn't write properly to the Security Account Manager (SAM) registry hive. Happens a lot when disk space is low or the system crashes mid-reset.

What you'll see: When logging in or running a service under that account, you get the error. Event Viewer might show LSA or SAM errors (event ID 1000 or 12294).

Fix: Force a SAM Repair Using the Registry

  1. Boot into Safe Mode with Command Prompt. Hold Shift while clicking Restart, then go to Troubleshoot > Advanced Options > Startup Settings > Restart. Press 4 or F4 for Safe Mode with Command Prompt.
  2. At the command prompt, type:
    reg load HKLM\TEMP_SAM C:\Windows\System32\config\SAM
    This loads the SAM hive as TEMP_SAM. You should see no errors if the file is readable.
  3. Now type:
    reg unload HKLM\TEMP_SAM
    This forces the system to re-read the SAM. Expect a brief pause.
  4. Reboot normally:
    shutdown /r /t 0
  5. Try logging in with the affected account. If it works, you're lucky. If not, the corruption is deeper — move to the next fix.

Why this works: Unloading and reloading the SAM clears minor inconsistencies. It's a quick shot, but it fails half the time.

Cause #2: The Account's Password Hash Got Deleted or Never Created

This happens when you create a local account but never set a password (the account stays blank), or when a tool like net user wipes the password hash without creating a new one. Windows stores the secret material — the password hash — in the SAM. If that entry is missing, you get 0XC0000371.

Real-world trigger: A sysadmin ran net user SomeAccount * and pressed Enter twice without typing a password, thinking it would clear the password. Instead, it left the hash empty.

Fix: Delete and Re-Create the Account

Don't waste time trying to repair a broken hash. It's faster to start fresh.

  1. Boot into Safe Mode with Command Prompt as above.
  2. See all local accounts:
    net user
    Note the exact name of the broken account.
  3. Delete the account:
    net user BadAccount /delete
    You'll get a confirmation message if it works.
  4. Create a new account with a strong password:
    net user GoodAccount StrongPass1! /add
  5. If it's a service account, add it to the right group:
    net localgroup Administrators GoodAccount /add
  6. Reboot:
    shutdown /r /t 0
  7. Now use the new account. The error should be gone.

Heads-up: If this account had user profile files, you'll lose access to them unless you copy them manually from C:\Users\OldAccount.

Cause #3: Domain Join (or Leave) Messed Up the Local SAM

When a computer joins or leaves a domain, Windows sometimes botches the local account store. This is especially common if you removed a computer from a domain and local accounts got orphaned. The domain side holds secrets, but the local side doesn't — so you get 0XC0000371 when trying to use local accounts.

Fix: Rebuild the SAM Using System Restore or Offline Password Reset

Skip the below if you don't have a restore point. But if you do, this is gold.

  1. Boot from a Windows installation USB. At the setup screen, click "Repair your computer" > Troubleshoot > Advanced Options > System Restore.
  2. Pick a restore point from before the domain change. Wait 10–15 minutes for it to complete.
  3. Check if the error is gone by logging into the affected account. If it works, you're done. If not, move to the offline password reset.

If no restore point exists: Use a third-party tool like NTPWEdit (offline password changer). Boot from a Windows PE USB, run NTPWEdit, load the SAM file from C:\Windows\System32\config\SAM, and clear the password for the broken account. Then reboot and set a new password.

NTPWEdit is safe for this specific case — it rewrites the password hash fresh. I've used it a dozen times with 0XC0000371. It works.

Quick-Reference Summary Table

CauseFixDifficulty
SAM corruption after password resetReload SAM via registryIntermediate
Missing or empty password hashDelete and re-create accountIntermediate
Domain join left broken local storeSystem Restore or offline password resetAdvanced

Remember: 0XC0000371 is always about missing secrets in the local account store. Start with the SAM reload — it's the quickest. If that fails, nuke the account and rebuild. For domain issues, a restore is your best bet. Don't mess with registry permissions unless you know exactly what you're doing — you'll break more than you fix.

Was this solution helpful?