Passwd Recovery Help: Dual Boot Hard Drive

Abstract: Reset a forgotten Windows password on a dual boot system by mounting the NTFS partition in Ubuntu and using chntpw to clear or change the SAM database credentials.

Created: 2026-10-05 by
You can recover a forgotten Windows password on a dual boot system by booting into Ubuntu, mounting the Windows partition, and using the chntpw utility to reset the SAM database. This method allows you to clear or set a new password without needing the original credentials, provided you have administrative access in Linux and physical access to the machine.

Prerequisites and System Preparation

Before attempting any password recovery, ensure that your Ubuntu installation is fully updated and that you have sudo privileges. The most critical requirement is knowing which partition holds your Windows installation. In a typical dual boot setup on a single hard drive, Windows often resides on an NTFS partition, such as /dev/sda1 or /dev/nvme0n1p3. You can identify this by running sudo fdisk -l or lsblk in the terminal. Look for partitions labeled "Microsoft basic data" or with the NTFS file system type. If your Windows installation uses BitLocker encryption, this method will not work because the partition data is encrypted. You must disable BitLocker from within Windows first. If you cannot access Windows, you will need to recover the BitLocker key from your Microsoft account or other backup sources before proceeding. Additionally, ensure that Secure Boot is either disabled or that you are using a signed kernel module if required by your specific hardware, although standard Ubuntu kernels usually handle this well.

Installing the Password Reset Tool

The primary tool for this task is chntpw, a command-line utility designed to interact with Windows SAM (Security Account Manager) files. Since it is not installed by default, you need to add it to your system. Open your Ubuntu terminal and update your package list to ensure you get the latest version of the tool.
sudo apt update
sudo apt install chntpw
This process may take a few minutes depending on your internet connection speed. Once the installation completes, verify that the tool is available by checking its version:
chntpw --version
Having chntpw installed provides the necessary binaries to edit the registry hives where Windows stores user passwords. It is important to use the version from the official Ubuntu repositories rather than compiling from source, as this ensures compatibility with the current kernel and library dependencies.

Mounting the Windows Partition

With the tools ready, the next step is to make the Windows partition accessible to Ubuntu. Create a temporary directory to serve as the mount point. This keeps your file system organized and makes it easy to unmount later.
sudo mkdir /mnt/windows
Now, mount the identified Windows partition to this directory. Replace /dev/sda1 with the actual device path you identified earlier. If your system uses NVMe drives, the path might look like /dev/nvme0n1p3.
sudo mount /dev/sda1 /mnt/windows
If the mount fails with an error related to the file system being "dirty" or requiring a check, it means Windows was not shut down properly (e.g., Fast Startup was enabled). You can force the mount by adding the -o force option, but be aware that this carries a slight risk of data corruption if the file system is truly damaged. A safer approach is to reboot into Windows, perform a full shutdown (holding Shift while clicking Restart), and then try mounting again.
sudo mount -o force /dev/sda1 /mnt/windows
Verify the mount was successful by listing the contents of the directory:
ls /mnt/windows/Windows/System32/config/
You should see files named SAM, SECURITY, SOFTWARE, SYSTEM, and possibly DEFAULT. These are the registry hives containing the user account information.

Resetting the Password

Navigate to the config directory where the SAM hive is located. This is the core file that stores hashed passwords for all local user accounts.
cd /mnt/windows/Windows/System32/config/
Run chntpw on the SAM file. This will open an interactive menu.
sudo chntpw SAM
The tool will display a list of user accounts found in the hive. Select the username you wish to reset by typing their number or name. Once selected, you will see several options. To clear the password entirely, choose the option to "Clear (blank) user password." Alternatively, you can set a new password by choosing the option to set a new password. Clearing the password is generally safer and easier, allowing you to log in without a password and change it later via Windows settings. After making your selection, confirm the changes by typing y when prompted. The tool will write the changes back to the SAM file. Exit the tool by typing q.
q

Finalizing and Rebooting

Once the password has been reset, it is crucial to unmount the Windows partition to prevent any file system inconsistencies.
sudo umount /mnt/windows
You can now remove the temporary directory if desired:
sudo rmdir /mnt/windows
Reboot your computer. When the GRUB menu appears, select Windows to boot. You should now be able to log in with the blank password (if cleared) or the new password you set. Upon logging in, Windows may prompt you to create a new password immediately; follow the prompts to secure your account. For more detailed guidance on managing dual boot configurations, refer to our guide on Safely Separating Linux and Windows Operating Systems on a Single Physical Disk. Additionally, if you encounter issues with bootloader recognition after these changes, check out Windows Won't Dual Boot with Ubuntu 24.04 LTS.

Frequently Asked Questions

Will this method delete my Windows files?

No, resetting the password does not affect your personal files, applications, or data stored on the Windows partition. The process only modifies the authentication records in the SAM hive. However, always backup important data before making system changes.

What if I don't know the root username?

chntpw lists all local user accounts when you run it against the SAM file. You can scroll through the list or look for familiar names. If you are unsure, you can try common names like "Administrator" or your own name.

Can I use this method on a Microsoft Account login?

No, this method only works for local offline accounts. If you log in with a Microsoft email address, your password is managed online. You would need to reset the password via the Microsoft website from another device.

Why did the mount fail with 'dirty' flag?

This happens when Windows uses Fast Startup, which hibernates the kernel instead of fully shutting down. To fix this, boot into Windows, disable Fast Startup in Power Options, and perform a full shutdown. Then retry the mount from Ubuntu.

Is it safe to use chntpw on modern Windows versions?

Yes, chntpw supports Windows 7, 8, 10, and 11. It interacts with the standard SAM structure which remains consistent across these versions. Always ensure you are editing the correct partition to avoid accidental changes to other systems.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More