Reset Windows password

From GigaTux Wiki
Revision as of 15:29, 3 February 2016 by Cocodude (talk | contribs) (Created page with "Resetting a Windows password is a fairly painful process. Make sure the VPS is fully off before doing this. Run '''parted /dev/lvm1/xenXX''' to get details of the full disk i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Resetting a Windows password is a fairly painful process. Make sure the VPS is fully off before doing this.

Run parted /dev/lvm1/xenXX to get details of the full disk image.

Then type unit and then B to show the units in bytes. Then type p to print the partition list. You will get something like:

(parted) p                                                                
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-18: 32212254720B
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start       End           Size          Type     File system  Flags
 1      1048576B    368050175B    367001600B    primary  ntfs         boot
 2      368050176B  32211206143B  31843155968B  primary  ntfs

We want partition 2, so note down the start offset.

Create a new directory, e.g. /win, and mount that. If you're not sure what you're doing, mount read only, but if you need to actually change the password, you can mount rw:

 mount -o ro,offset=368050176 /dev/lvm1/xenXX /win

Now /win contains the contents of the NTFS filesystem.