-
Senior Member
registered user
Reset Lost Windows Admin Passwords
Heres a small script I wrote that auto detects if Vista or XP is in Use. It then mounts the partition
and runs chntpw in interactive mode. If dual boot i.e. Vista and XP are in use, it detects both OS's
giving the option to reset or quit.
You can copy the lines inssert the file onto a usb drive. Next time you use knoppix 5.11 or 5.31
install chntpw first:
apt-get update
apt-get install chntpw
Use the script at your own risk, theres always an element of piracy hence the warning message.
#!/bin/sh
#password reset for XP/Vista run as sudo or kdesu
#
#
clear
echo -e "\E[32m Reset Password Utility for XP and Vista"
echo
echo
echo
for i in hda1 hda2 hda3 hda4 hdb1 hdb2 hdb3 hdb4 sda1 sda2 sda3 sda4 sdb1 sdb2 sdb3 sdb4
do
mkdir /media/$i 2>/dev/null
mount /dev/$i /media/$i 2>/dev/null
# Detect WinXP
if [ -e /media/$i/boot.ini ]; then
echo -e "\E[37m Windows XP detected on /dev/$i"
echo
echo -e "\E[33m Warning:";echo -e "\E[31m Please ensure you have a reasonable guarantee from the customer that
this computer is owned by them before proceeding."
echo -e "\E[32m "
echo
sleep 6
chntpw -i /media/$i/WINDOWS/system32/config/SAM
umount /media/$i
fi
# Detect Vista
clear
if [ -e /media/$i/Users ]; then
echo -e "\E[36m Windows Vista detected on /dev/$i"
echo
echo -e "\E[33m Warning:";echo -e "\E[31m Please ensure you have a reasonable guarantee from the customer that
this computer is owned by them before proceeding."
echo -e "\E[36m "
echo
echo
sleep 6
chntpw -i /media/$i/Windows/System32/config/SAM
umount /media/$i
fi
if [ $i == sdb4 ] && [ -e /media/$i/Users -o -e /media/$i/boot.ini ]; then
echo -e "\E[36m No Operating System detected"
sleep 4
fi
done
Similar Threads
-
By askme in forum MS Windows & New to Linux
Replies: 8
Last Post: 09-25-2017, 02:47 AM
-
By spiferpipit in forum MS Windows & New to Linux
Replies: 3
Last Post: 04-18-2007, 10:09 AM
-
By Slinky in forum MS Windows & New to Linux
Replies: 6
Last Post: 04-23-2006, 08:02 PM
-
By JPsDad in forum MS Windows & New to Linux
Replies: 0
Last Post: 01-23-2005, 09:03 PM
-
By dave52355 in forum Hdd Install / Debian / Apt
Replies: 5
Last Post: 10-30-2003, 07:29 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Juniper EX2200-C-12T-2G 12 Port L3 EX2200-C Compact Fanless Switch 1YearWarranty
$195.00
Juniper EX4300-24T Layer 3 24 Ports Manageable Ethernet Switch 1 Year Warranty
$195.00
JUNIPER EX3400-48P 48x 1GB PoE+ RJ-45 4x 10GB SFP+ 2x 40GB QSFP+, DUAL AC POWER
$210.00
Juniper Networks EX3300 EX3300-48P 48-Port Gigabit PoE+ Switch
$40.18
Juniper Networks EX4300-48T 48 Port Gigabit 4 QSFP 40G 2xPSU AFO Network Switch
$89.00
Juniper Networks EX2300-C 12-Port 2XSFP Uplinks PoE+ Switch P/N: EX2300-C-12P
$299.99
Juniper Networks EX3300-24P | 24 Port Gigabit Network Switch w/ Power cord
$53.99
Juniper EX2300-24P Poe+ Rack Mountable Ethernet Switch
$130.00
Juniper QFX5100-48T-AFO 48 100M/1G/10G Base-T 6 QSFP AFO
$485.00
Juniper EX2300-48P PoE+ Switch 48x 1GbE & 4 SFP+/SFP 10G uplinks, Tested
$289.00