Chntpw: Difference between revisions

From Leo's Notes
This page was last edited on 14 June 2020, at 22:00.
initial page
 
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The {{code|chntpw}} Linux utility lets you reset a Windows user account password.
{{code|chntpw}}, short for '''Ch'''ange '''NT''' '''P'''ass'''w'''ord, is a utility for updating or clearing Windows account passwords by modifying the SAM database directly. This utility runs only on Linux and can be found on some live CD images including Clonezilla.


== Usage ==
== Usage ==
Boot into a live CD with the utility. Clonezilla conveniently has this built in.
Boot into a linux distro or live CD with the utility. The examples below was done using Clonezilla.


{{highlight|lang=bash|code=
{{highlight|lang=terminal|code=
# Mount your Windows partition
## Mount your Windows partition
mount /dev/sda1 /mnt
# mount /dev/sda1 /mnt


# Locate the SAM database
## Locate the SAM database
cd /mnt/Windows/System32/config
# cd /mnt/Windows/System32/config
file SAM
# file SAM
SAM: MS Windows registry file, NT/2000 or above
SAM: MS Windows registry file, NT/2000 or above


# Edit or clear the password using chntpw
## Edit or clear the password using chntpw
chntpw SAM
# chntpw SAM
}}
}}


== Caveats ==
If your Windows partition is encrypted, you will probably be unable to mount the Windows partition properly.


[[Category:Linux]]
Changing passwords might not work for recent versions of Windows. Try clearing the password instead.
 
{{Navbox Linux}}[[Category:Linux]]
[[Category:LinuxUtilities]]

Latest revision as of 22:00, 14 June 2020

chntpw, short for Change NT Password, is a utility for updating or clearing Windows account passwords by modifying the SAM database directly. This utility runs only on Linux and can be found on some live CD images including Clonezilla.

Usage

Boot into a linux distro or live CD with the utility. The examples below was done using Clonezilla.

## Mount your Windows partition
# mount /dev/sda1 /mnt

## Locate the SAM database
# cd /mnt/Windows/System32/config
# file SAM
SAM: MS Windows registry file, NT/2000 or above

## Edit or clear the password using chntpw
# chntpw SAM

Caveats

If your Windows partition is encrypted, you will probably be unable to mount the Windows partition properly.

Changing passwords might not work for recent versions of Windows. Try clearing the password instead.