Skip to content

Instantly share code, notes, and snippets.

@ujeenator
Created July 11, 2019 16:23
Show Gist options
  • Save ujeenator/58e7ef1c2d59f760d0a890783a3cb00e to your computer and use it in GitHub Desktop.
Save ujeenator/58e7ef1c2d59f760d0a890783a3cb00e to your computer and use it in GitHub Desktop.
Reset Windows user password using Ubuntu LiveCD
# Install required utils
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install chntpw ntfs-3g -y
# Find path of Windows system volume
sudo fdisk -l
# Fix possible problems with windows volume e.g. ungraceful shutdown
sudo ntfsfix windows_volume_path # e.g. /dev/sdaN
# Mount windows volume
sudo mkdir /media/windows-disk
sudo mount -t ntfs-3g windows_volume_path /media/windows-disk
# Go to directory where passwords are stored
cd /media/windows-disk/Windows/System32/config
# Find name of target user (case-sensitive)
chntpw -l SAM
# Select options:
# 1 to remove password
# 2 to unlock account
# 3 to promote user to administrator
# press q and y at the end to save changes
chntpw -u user_name SAM
# Reboot to Windows
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment