In this tutorial, I will present a way to change or delete a user password in a Windows XP operating systems or Windows 7.
On Windows Vista, I have not tried it yet, but you can try.
I get under Fedora 15 this software, using yum.
# yum install chntpw
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
--> Running transaction check
---> Package chntpw.i686 0:0.99.6-15.fc15 will be installed
--> Finished Dependency Resolution
Package Arch Version Repository Size
chntpw i686 0.99.6-15.fc15 fedora 71 k
Install 1 Package(s)
Total download size: 71 k
Installed size: 212 k
Is this ok [y/N]: y
You need to locate the SAM file. Under Windows 2000 and XP is normally located at
windows/system32/config or winnt/system32/config
Then you need to navigate and find a number of files like SAM, SYSTEM, SECURITY…
Once you have located the SAM you can start using chntpw.
Use this command to see the help
# chntpw -h
chntpw version 0.99.6 080526 (sixtyfour), (c) Petter N Hagen
chntpw: change password of a user in a NT/2k/XP/2k3/Vista SAM file, or invoke registry editor.
chntpw [OPTIONS] [systemfile] [securityfile] [otherreghive] [...]
-h This message
-u Username to change, Administrator is default
-l list all users in SAM file
-i Interactive. List users (as -l) then ask for username to change
-e Registry editor. Now with full write support!
-d Enter buffer debugger instead (hex editor),
-t Trace. Show hexdump of structs/segments. (deprecated debug function)
-v Be a little more verbose (for debuging)
-L Write names of changed files to /tmp/changed
-N No allocation mode. Only (old style) same length overwrites possible
See readme file on how to get to the registry files, and what they are.
Source/binary freely distributable under GPL v2 license. See README for details.
NOTE: This program is somewhat hackish! You are on your own!
If you want to list all the users on in the SAM file, use this command:
Use this command to change the password or clear the password:
chntpw -u windows_user SAM
The windows_user is the user list by command chntpw SAM
There are other options that can be applied to a windows user, but these two are used.
This program can be used on a Linux install on USB.