How to reset the password for the local Administrator account (or enable it) using Linux

If you have a personal computer maybe this is nothing you encounter very often.

If you have a computer in a network, in a domain maybe, you will definitely need at some point the local Administrator password. This occurs with various issues like the computer going out of the domain or user accounts problems.

There are 2 common situations:

  1. You know the Administrator password but the account is disabled.
  2. You don’t know/forgot the Administrator password.

The method below will help on both problems.

The Linux command used is chntpw.

Note: HirenBootCD uses the same application.

chntpw is not installed by default on Linux distros so you have to install it from your Package Manager.

I have it on a bootable USB flash with Puppy Linux. Here is my presentation of Puppy Linux.

DISCLAIMER!!! Resetting the Administrator password with this method is considered brute force cracking and not permitted in networks. It might be illegal in your area. The method below is only for educational purposes and you should never do that. System Administrators will detect that. If you can’t access a computer, always ask help from the System Administrator.

How to use it (i assume we use Windows XP but the method is use for other version of Windows):

  1. Boot the machine with the Puppy Linux USB flash.
  2. Make sure the Windows partition where the Windows folder is mounted.
  3. Open a Terminal and navigate to the location of your SAM file (in Windows XP is here: C:\WINDOWS\system32\config). For other versions of Windows find the SAM file location first.
  4. Type this at the prompt, without quotes: “sudo chntpw -u Administrator SAM“.
  5. Here you will be given some options. The 1st one is to reset the Administrator with a blank password and the 4th is to enable the Administrator account.
  6. Depending of your situation, enter a number and press [Enter].
  7. When the app asks you to write the SAM file, choose [y] and press [Enter].
  8. Reboot and login. If you enabled the Account, login with the password you knew. If you reset the account, use a blank password.
  9. Always remember your local Administrator password and disable the account after you did your job.

Happy day!

Advertisements

Windows: File associations per user

If file associations are messed up on a specific user and the File Associations in Folder Options are correct, do this:

  1. Press [Win+R]
  2. Type regedit and press [Enter] to open Regedit (the registry editor)
  3. Navigate to HKEY_CURRENT_USER\Software\Classes
  4. Find you file type and see the software opens it. Usually the path to the software is messed up. Correct it and restart the computer.

I had a problem with .xls files on a single user like double clicking the file and nothing happened. If I opened Excel and did an Open for the file, it worked, but no double clicking.

NOTE: System wide file associations are in HKEY_LOCAL_MACHINE\Software\Classes.

Windows 7: Create new domain profile with the same name as an existing one

Original thread here and original of the original thread here. ^-^

  1. Rename the user’s profile folder to Bob.old
  2. Logged in as an admin, go to Control Panel → User Accounts → Manage User Accounts. Domain accounts show there after an initial login.
  3. Delete the account for Bob
  4. Open regedit and make sure that the user is no longer in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Delete it if present, even if it is followed by “.bak”.

Then you can login as bob to recreate the local user profile, then copy your user data into it. “