The procedure of Linux and Windows password reset.

 

Linux password reset

  1. Plug the iso image with the same OS and architecture.
  2. Set the disk reading to be the first in the boot order and restart the server.
  3. Go to console (Recovery mode or Rescue).
  4. Enter the following commands:

mkdir /mnt/tmp – create a temporary directory to mount the section.

mount /dev/sda1 /mnt/tmp – command to mount the first section at the first disk to /mnt/tmp folder

It is necessary to mount the section with /etc /sys /proc and others system folders. If the installation was not successful you may reinstall the section using umount /mnt/tmp command and do the procedure again.

chroot /mnt/tmp – the command to assign the root section to /mnt/tmp folder. So / means /mnt/tmp/.

passwd root – assign a new password for the user.

umount /mnt/tmp – reinstall the section.

Pull out the disk, change the boot order to the standard one (HDD to boot first) and restart your server.
reboot

 

Windows Server 2012 and Windows 8 password reset

  1. Mount the iso image with the required OS version.
  2. Select “System restore” at the beginning.
  3. Go to console.
    • Diagnostics
    • Command setup
  4. Copy (save) Sethc.exe file using temp command to the temporary folder:
    copy d:\windows\System32\sethc.exe d:\temp
  5. Change sethc.exe file to Cmd.exe file using copy command:
    copy d:\windows\System32\cmd.exe d:\windows\System32\sethc.exe
  6. Exit the console.
  7. Reboot the computer.

Select “Troubleshoot”.

Select “Command Prompt”.

Create a temp folder on D drive if it was not created before.

Notification: In this case, the C drive is perceived by the machine as a D drive. The boot disk created section C for itself, so all other sections were moved. At this step you need to check the disks carefully.

Reboot OS and press Shift 5 times (sethc.exe program is responsible for this, we changed it to cmd.exe).If the console did not open press the switch contrast button (this button is placed under the date).

Assign the new password to the new local user Administrator

net user “Administrator” your_password

Close the window and enter system using the new password.
If the account is disabled, you can enable it with the following command.

net user “Administrator” /active:yes

You may change the password of any local user.

Notification: this method will not work for operating systems which are in the domain and are authenticated under Active Directory (AD).

For Windows Server 2003-2008 and Windows XP, 7 the procedure is identical, but you need to change cmd.exe to utilman.exe (options)