Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › How To: Recover from a forgotten Windows Login password
New Posts  All Forums:Forum Nav:

How To: Recover from a forgotten Windows Login password

post #1 of 3
Thread Starter 
One way of doing this if Hirens won't work (I've had it happen a few times) is complex, but simple when you think about it. So, I'm going to post it here for future reference smile.gif

1. Grab a Windows 7/Vista CD or bootable USB and use it to boot.

2. At the set up screen choose "repair" instead of install and let it search for your OS. You may or may not have one found. That's fine as long as you know it's there!

3. Choose the command prompt option and let the command prompt open.

4. Next type these commands in:
Code:
cd C:\Windows\System32
copy sethc.exe sethc.exe.bak
delete /f sethc.exe 
copy cmd.exe sethc.exe

This navigates you to the system32 folder in the Windows directory and makes a back up of the file "sethc.exe" then copies cmd.exe and creates a copy called sethc.exe. Essentially you can see we've basically renamed a copy of cmd to sethc.exe. sethc.exe is the "Sticky keys" program. When you hit "shift" 5 times quickly (try this now) it opens a box regarding sticky keys. This box runs elevated with admin permissions. Very handy...

5. Reboot your PC and wait until you're at the logon screen, then hit shift 5 times. The command line prompt should open (instead of the stickykeys) AND it'll be elevated with administrator permissions. Now we can get to resolving the account.

6. At the command prompt, type:
Code:
net user test test1 /add
net localgroup Administrators test /add

This creates a user called "test" with the password "test1" and adds them. Then the second command adds that user to the Administrators group. However, we're not done. type:
Code:
net user test

pay close attention to the usergroups and localgroups this user belongs to. If they belong to ANY other group, such as "users" or "guest" then you need to type the following:
Code:
net localgroup users test /delete

7. After that, reboot and your new user account should be there. You can then log in, with admin rights, and remove the offending password.

As far as I know this works on any Windows NT system, XP, Vista and 7.

Don't forget to restore the sethc.exe file when you've finished.


Myself and Overclock.net cannot take any responsibility from misuse of this guide smile.gif
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
post #2 of 3
bump cause its a nice guide. this happened once when my crappy laptop keyboard input the same key twice, the exact same way for both the new password and the confirm password boxes and i didnt know what to do for the longest time! And i didnt know how it messed up so i could not guess the password:mad:
Dream Machine
(21 items)
 
 
My laptop
(10 items)
 
CPUMotherboardGraphicsRAM
Intel i7 4790K ASUS Maximus VI Hero EVGA GTX780Ti 16GB G.Skill Trident X 
Hard DriveCoolingCoolingCooling
Samsung EVO 500GB EK Supremacy EK GTX780Ti block Alphacool NexXxoS XT45 420 
CoolingCoolingOSMonitor
Alphacool NexXxoS UT60 280 x8 Noctua NF-A14 PWM fans Windows 10 64-bit BenQ XL2430T 
MonitorKeyboardPowerCase
BenQ XL2420T Realforce Tenkeyless 45g Corsair AX860i Corsair 750D 
MouseMouse PadAudio
Logitech G Pro Logitech G640 Sennheiser Game One 
CPUMotherboardGraphicsRAM
Core i7 920 D0 @ 4.2GHz Gigabyte GA-X58A-UD3R rev. 2 EVGA GeForce GTX 580 6GB DDR3 OCZ Platinum @ 1600 6-8-6-24 1T 
Hard DriveHard DriveCoolingOS
Crucial C300 Samsung HDD Noctua NH-D14 with 3 NF-P14 fans Windows 7 Ultimate 64-bit 
MonitorKeyboardPowerCase
BenQ XL2420T Realforce 87UB Corsair HX850W HAF-X 
MouseMouse PadAudio
Zowie FK Artisan Hayate ASUS Xonar Essence STX 
CPUMotherboardGraphicsRAM
Intel 3610QM N56VZ NVIDIA GT650M 2GB 8GB 
Hard DriveOptical DriveOSKeyboard
Samsung 830 256GB Fancy Blu-Ray burner Windows 64-bit backlit 
PowerMouse Pad
battery or wall yes 
  hide details  
Reply
Dream Machine
(21 items)
 
 
My laptop
(10 items)
 
CPUMotherboardGraphicsRAM
Intel i7 4790K ASUS Maximus VI Hero EVGA GTX780Ti 16GB G.Skill Trident X 
Hard DriveCoolingCoolingCooling
Samsung EVO 500GB EK Supremacy EK GTX780Ti block Alphacool NexXxoS XT45 420 
CoolingCoolingOSMonitor
Alphacool NexXxoS UT60 280 x8 Noctua NF-A14 PWM fans Windows 10 64-bit BenQ XL2430T 
MonitorKeyboardPowerCase
BenQ XL2420T Realforce Tenkeyless 45g Corsair AX860i Corsair 750D 
MouseMouse PadAudio
Logitech G Pro Logitech G640 Sennheiser Game One 
CPUMotherboardGraphicsRAM
Core i7 920 D0 @ 4.2GHz Gigabyte GA-X58A-UD3R rev. 2 EVGA GeForce GTX 580 6GB DDR3 OCZ Platinum @ 1600 6-8-6-24 1T 
Hard DriveHard DriveCoolingOS
Crucial C300 Samsung HDD Noctua NH-D14 with 3 NF-P14 fans Windows 7 Ultimate 64-bit 
MonitorKeyboardPowerCase
BenQ XL2420T Realforce 87UB Corsair HX850W HAF-X 
MouseMouse PadAudio
Zowie FK Artisan Hayate ASUS Xonar Essence STX 
CPUMotherboardGraphicsRAM
Intel 3610QM N56VZ NVIDIA GT650M 2GB 8GB 
Hard DriveOptical DriveOSKeyboard
Samsung 830 256GB Fancy Blu-Ray burner Windows 64-bit backlit 
PowerMouse Pad
battery or wall yes 
  hide details  
Reply
post #3 of 3
Thread Starter 
Thanks mate smile.gif
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Windows
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › How To: Recover from a forgotten Windows Login password