Results 1 to 5 of 5

Thread: Reset Lost Windows Admin Passwords

  1. #1
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282

    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

  2. #2
    Administrator Site Admin-
    Join Date
    Apr 2003
    Location
    USA
    Posts
    5,441
    Anyone considering doing this should understand that this writes to your NTFS partition with Knoppix. Some people think this is safe. Other people report problems with it, including completely destroying their data.
    ---
    Verifying of md5 checksum and burning a CD at slow speed are important.

  3. #3
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    Quote Originally Posted by Harry Kuhman
    Anyone considering doing this should understand that this writes to your your NTFS partition with Knoppix. Some people think this is safe. Other people report problems with it, including completely destroying their data.
    Yes, good point. With knoppix 5.1.1 which uses kernel 2.4.19 a warning does appear about upgrading to a kernel 2.6.20 or higher when using ntfsprogs. Personally I've never lost data on an NTFS partition using linux, even with the earlier Captive program on a 2.4.xx kernel, but have lost plenty of data with windows. Knoppix 5.3.1 uses kernel 2.4.24 but there is always a small element of risk.
    Even the chntpw program suggests not changing a password but just blanking it. The above script should therefore be used at your own risk, as stated previously.

  4. #4
    Senior Member registered user
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    204
    I'm among those lucky one which never lost any data when writing to ntfs.

    I double check on my knoppix 5.1.1, it runs kernel 2.6.19.

    Just curious, on your shell script, the /dev/$i is mounted as read-only. So does that mean that the program chntpw still be able to write to the mount point /media/$i?

    Rgds,
    Chip

  5. #5
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    Quote Originally Posted by chip.ling
    I'm among those lucky one which never lost any data when writing to ntfs.

    I double check on my knoppix 5.1.1, it runs kernel 2.6.19.

    Just curious, on your shell script, the /dev/$i is mounted as read-only. So does that mean that the program chntpw still be able to write to the mount point /media/$i?

    Rgds,
    Chip
    Hi Chip,
    Sorry wrote this using knoppix 5.3.1 which uses ntfs-3g as default and therefore mouting ntfs partitions are rw.
    Forr knoppix 5.1.1 install ntfs-3g

    and change the following line

    mount /dev/$i /media/$i 2>/dev/null

    to read

    mount -rw /dev$i /media$i 2>dev/null

    this should mount all partitions with rw access.

Similar Threads

  1. How to Reset Windows XP admin password with Knoppix
    By askme in forum MS Windows & New to Linux
    Replies: 8
    Last Post: 09-25-2017, 02:47 AM
  2. Forgot Windows 2000 Admin Passoword
    By spiferpipit in forum MS Windows & New to Linux
    Replies: 3
    Last Post: 04-18-2007, 10:09 AM
  3. NEED TO RECOVER WINDOWS ADMIN PASSWORD!
    By Slinky in forum MS Windows & New to Linux
    Replies: 6
    Last Post: 04-23-2006, 08:02 PM
  4. Lost (KDE)Wallet access. How to reset?
    By JPsDad in forum MS Windows & New to Linux
    Replies: 0
    Last Post: 01-23-2005, 09:03 PM
  5. Lost my Admin password Help!
    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
  •  


Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD picture

Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD

$75.00



Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$721.06



H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W picture

H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W

$2512.18



R281-3C2 2U 12 Bay GPU Server 2.2Ghz 20-C 64GB 2x10G SFP+ 2x1200W TrueNAS ZFS picture

R281-3C2 2U 12 Bay GPU Server 2.2Ghz 20-C 64GB 2x10G SFP+ 2x1200W TrueNAS ZFS

$1180.24



DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$275.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



Dell PowerEdge R620 Server 2x Xeon  E5-2620 @ 2.0GHz 64GB RAM NO HDDs picture

Dell PowerEdge R620 Server 2x Xeon E5-2620 @ 2.0GHz 64GB RAM NO HDDs

$108.96



Intel R1208WT2GSR Server 2 x Xeon E5-2620 2.4GHz, 32GB RAM, No HDD, 2 x PS picture

Intel R1208WT2GSR Server 2 x Xeon E5-2620 2.4GHz, 32GB RAM, No HDD, 2 x PS

$950.00



HP Proliant DL360 Gen9 28 Core SFF Server 2X E5-2680 V4 16GB RAM P440ar No HDD picture

HP Proliant DL360 Gen9 28 Core SFF Server 2X E5-2680 V4 16GB RAM P440ar No HDD

$191.95



1U Supermicro Server X10DRU-i+ 2x Xeon E5-2690 V4 28 Cores 64GB 4x 10GBE-T 2PS picture

1U Supermicro Server X10DRU-i+ 2x Xeon E5-2690 V4 28 Cores 64GB 4x 10GBE-T 2PS

$324.00