summaryrefslogtreecommitdiffstats
path: root/content/posts/resetting-passwords-chntpw.md
diff options
context:
space:
mode:
authorbreadcat2020-06-19 12:23:15 +0100
committerbreadcat2020-06-19 12:23:15 +0100
commit70bb5d5a801428b0fb390abf79f19ffcf5e29c67 (patch)
treeb9fd7990156bd58bc38d58f91829c05933215102 /content/posts/resetting-passwords-chntpw.md
parent0f9a31348079c0a061bcc194912e75cc1c07bc1f (diff)
downloadblog.minskio.co.uk-70bb5d5a801428b0fb390abf79f19ffcf5e29c67.tar.gz
blog.minskio.co.uk-70bb5d5a801428b0fb390abf79f19ffcf5e29c67.tar.bz2
blog.minskio.co.uk-70bb5d5a801428b0fb390abf79f19ffcf5e29c67.zip
Simple migration of existing posts to hugo format
Diffstat (limited to 'content/posts/resetting-passwords-chntpw.md')
-rw-r--r--content/posts/resetting-passwords-chntpw.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/content/posts/resetting-passwords-chntpw.md b/content/posts/resetting-passwords-chntpw.md
new file mode 100644
index 0000000..ff466a8
--- /dev/null
+++ b/content/posts/resetting-passwords-chntpw.md
@@ -0,0 +1,30 @@
+---
+title: "Resetting Windows Passwords from Linux with chntpw"
+date: 2018-12-13T09:58:00
+tags: ["guides", "linux", "snippets", "software", "windows"]
+---
+
+I came across a strange issue recently, where I needed to reset a users password however the computer was unable to boot from USB so my usual [ntpasswd](https://pogostick.net/~pnh/ntpasswd/) option was out of the question.
+
+Step in the ever userful `chntpw` which is available in the Debian repositories and can be installed via:
+```
+sudo apt-get install chntpw ntfs-3g
+```
+
+`ntfs-3g` is also thrown into the mix so you can mount the inevitable Windows NTFS partition with write permissions
+
+From here on, we'll be executing everything as root to avoid strange permission issues, so elevate yourself via `su`.
+
+Find your disks Windows partition via `blkid` and mount it via:
+```
+mkdir /mnt/win && ntfs-3g /dev/sdb2 /mnt/win
+```
+Where `sdb2` is your Windows Partition.
+
+Then `cd` to your System32's config directory with:
+```
+cd /mnt/win/Windows/System32/config
+```
+and ensure the `SAM` registry hive is located there with `ls`.
+
+Now start the software on the SAM file with `chntpw -i SAM`. Follow the instructions onscreen to blank the password and unlock the account if need be. When quitting ensure you save your changes then boot the Windows drive and enjoy your new unlocked Administrator (or other) account. \ No newline at end of file