0X0000215D: SAM Initialization Failure Fix
Windows hits this error when the SAM registry hive is corrupted or missing. The fix usually involves repairing the SAM hive from backup or booting from recovery media.
When you see 0X0000215D (ERROR_SAM_INIT_FAILURE), your system just told you the Security Account Manager (SAM) registry hive can't load. This is the database that stores user passwords, group memberships, and security descriptors. If it's corrupt, missing, or has wrong permissions, Windows won't boot — period.
The real cause is almost always a corrupted SAM file in C:\Windows\System32\config\SAM. This can happen after a sudden power loss, a failed disk sector, a registry cleaner tool gone rogue, or a bad Windows update that interrupted hive writes. I've seen it most often on laptops where the battery died mid-update — the SAM hive was left in an inconsistent state.
1. Restore SAM from the regback folder (most common fix)
Windows keeps automatic backups of the registry hives in C:\Windows\System32\config\RegBack. If that folder isn't empty, you can copy the SAM file back to the live config folder. This works about 80% of the time.
- Boot from Windows installation media (USB or DVD). On the first screen, press Shift+F10 to open a command prompt.
- Identify which drive letter holds your Windows partition. It's often
D:orE:, notC:, when booted from media. Rundir D:\Windows\System32\configto confirm. - Check the backup exists:
dir D:\Windows\System32\config\RegBack\SAM. If you see a SAM file there, proceed. - Copy the backup over the broken one:
copy D:\Windows\System32\config\RegBack\SAM D:\Windows\System32\config\SAM - Repeat for SYSTEM and SECURITY hives if you want to be thorough (they often get hit together):
copy D:\Windows\System32\config\RegBack\SYSTEM D:\Windows\System32\config\SYSTEM copy D:\Windows\System32\config\RegBack\SECURITY D:\Windows\System32\config\SECURITY - Remove the media and reboot:
wpeutil rebootorexitand restart.
Why this works: The RegBack folder is updated by the System Restore or the Windows Backup service. It's a snapshot of the registry from a previous successful boot. The SAM hive in there matches the user accounts from that point. If you haven't changed passwords since that backup, you're golden. If you have, you'll need to log in with the old password — or use a password reset tool.
2. Repair the SAM hive using chkdsk (second most common cause)
Sometimes the SAM file isn't corrupt in content, but the disk sector it lives on went bad. File system corruption mimics registry corruption. You'll see the same 0X0000215D error because Windows can't read the hive atomically.
- Boot from installation media again, open command prompt with Shift+F10.
- Run
chkdsk /f D:(replace D: with your Windows partition). The/fflag tells it to fix errors on the spot. - Let it finish — this can take 10-20 minutes on a large drive. It'll report any bad sectors and move data off them.
- After chkdsk completes, try the regback copy from step 1 again if you haven't already. Sometimes the backup file was also on a flaky sector, so chkdsk may have repaired that too.
- Reboot:
wpeutil reboot.
When to skip this: If you're on an SSD with no history of disk errors, chkdsk probably won't help. Go straight to step 1 or step 3.
3. Offline registry editing with regedit (advanced, last resort)
If regback is empty or copying it fails, the SAM hive is probably beyond a simple file copy. You can load the hive from the recovery environment and manually fix permissions or delete corrupt keys — but this is risky. I only recommend it if you have a backup of the entire config folder.
- Boot from installation media, open command prompt.
- Type
regeditand press Enter. The Registry Editor window will open. - Click HKEY_LOCAL_MACHINE to select it, then go to File > Load Hive.
- Navigate to
D:\Windows\System32\config\SAM(replace D: with your drive). Give it a temporary key name likeTEMP_SAM. - Look under
HKEY_LOCAL_MACHINE\TEMP_SAM\SAM\Domains\Account\Users. This is where user accounts live. If you see binary data that's all zeros or garbled ASCII, that's corruption. You can't fix that manually. - Sometimes the issue is permission inheritance: the SAM hive lost its ACL. In the
TEMP_SAMkey, right-click > Permissions, addSYSTEMwith Full Control, thenAdministratorswith Full Control. Apply and unload the hive: selectTEMP_SAM> File > Unload Hive. - Reboot and test.
Why this rarely works: If the hive is structurally corrupt, no amount of permission fixing will help. The data is gone. In that case, you need to restore from a system image backup, or reinstall Windows while keeping files.
Quick-reference summary table
| Cause | Symptom | Fix | Success rate |
|---|---|---|---|
| RegBack folder has valid SAM backup | Error on boot, RegBack not empty | Copy SAM from RegBack | 80% |
| Disk sector failure | Error on boot, chkdsk reports bad sectors | Run chkdsk /f, then copy SAM from RegBack | 60% |
| Hive structurally corrupt, no backup | Error on boot, RegBack empty or copy fails | Load hive in regedit, fix permissions (rarely helps) or restore from system image | 5% |
One last thing: if you're running Windows 11 22H2 or later, Microsoft changed how the registry handles large hives. Some third-party cleanup tools that delete SAM entries for "inactive" accounts can trigger this exact error. So if you ran CCleaner or a similar tool before this happened, that's your culprit. Don't let registry cleaners touch SAM — ever.
Was this solution helpful?