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

How to install memtest86+ on a USB flash drive

It comes a time when your computer starts trowing on you some errors, restarts, blue screens of death and the only thing left is to start checking what is causing the problems.

One of the first things you should check is if you have a faulty RAM module.

The best tool for testing memory modules is memtest86+.

Where you can find Memtest:

  • On HirenBootCD.
  • On almost every linux distribution LiveCD.

If you remember the previous tutorial on this site about Puppy Linux on a bootable flash disk drive, the thing is, we don’t have memtest86+, but we can install it on the good old trusty linux on a stick to use memtest on any computer that can boot from USB.

We assume you have the Puppy Linux installed on a USB flash drive and we start from there:

  1. Boot your computer on Puppy from your USB drive.
  2. Go to Menu > System > Grub4Dos bootloader config.
  3. Select your USB drive and press OK.
  4. On the next screen just press OK to install GRUB bootloader (GRUB is menu system that lets you choose the OS/drive/app you want to boot into).
  5. Open a web Browser and go to the Memtest download website.
  6. Download the 3rd link (as of Memtest86+ V5.01 (27/09/2013), the one that points to memtest86+-5.01.bin.gz
  7. On the bottom of your Puppy Linux desktop open the root of your Puppy USB drive (mine is sdf1). Leave this window open.
  8. At the top of the Puppy Linux desktop open the file app (the one with a home icon on a folder).
  9. Press the Downloads folder. Here you will find the downloaded Memtest file.
  10. Right click and Rename. Rename it to memtest.bin.
  11. Now drag the file from step 10 to the window on step 7 to move the memtest.bin file there.
  12. Now, on the location you moved the memtest.bin file (your sdfx location=the root of your USB drive) you can see menu.lst (the menu for the GRUB bootloader).
  13. Open menu.lst and after the entry for Puppy linux, paste this (without the 14.):
  14. # memtest+
    title memtest86+ v5.0.1
    kernel /memtest.bin
    boot
  15. Close the file and reboot Puppy.

 

After rebooting the Puppy Linux USB drive, you will get the GRUB bootloader with some entries:

  • Puppy
  • Memtest
  • Windows (if you have it installed)

All entries shoot boot the appropriate OS/apps but to test our installation select Memtest and wait until it checks your RAM modules. Press ESC when done.

There you have it, you can test the memory on any USB bootable computer in the world.

Have fun and if you have questions, please shoot!