Friday, November 27, 2009

How to Reset Passwords on Windows, Linux, and Windows Server

Losing access to your system due to a forgotten password can be frustrating. Below are detailed steps to reset passwords on various operating systems, including Windows 7, 8, 10, 11, Linux, and Windows Server.


Resetting Password on Windows 7, 8, 10, and 11

Method 1: Using Another Administrator Account (If Available)

  1. Log in to the computer using another administrator account.

  2. Press Windows + R, type control userpasswords2, and hit Enter.

  3. Select the user account you want to reset.

  4. Click Reset Password.

  5. Enter the new password and confirm it.

  6. Click OK and then log in with the new password.


Method 2: Using Password Reset Disk (If Created Earlier)

  1. At the login screen, enter any wrong password.

  2. Click on Reset password option.

  3. Insert the password reset USB drive.

  4. Follow the Password Reset Wizard instructions.

  5. Set a new password and finish.


Method 3: Using Safe Mode and Built-in Administrator Account (Windows 7 and 8)

  1. Restart your PC.

  2. Press F8 repeatedly before Windows logo appears.

  3. Select Safe Mode with Command Prompt.

  4. When Command Prompt opens, type:

    net user [username] [newpassword]

    Replace [username] with the target account name and [newpassword] with your new password.

  5. Press Enter and restart the computer normally.


Method 4: Using Windows Installation Media (For Windows 10 and 11)

  1. Create a Windows bootable USB using Media Creation Tool.

  2. Boot the computer from the USB.

  3. Select language and click Next.

  4. Click Repair your computer at the bottom-left corner.

  5. Choose Troubleshoot > Advanced Options > Command Prompt.

  6. In Command Prompt, type these commands to replace Utility Manager with Command Prompt:

    move c:\windows\system32\utilman.exe c:\ copy c:\windows\system32\cmd.exe c:\windows\system32\utilman.exe
  7. Restart the computer.

  8. At the login screen, click the Ease of Access icon (Utility Manager), which opens Command Prompt.

  9. Reset the password:

    net user [username] [newpassword]
  10. Press Enter, then reboot the system.

  11. Restore the original Utility Manager by booting again from USB and running:

    copy c:\utilman.exe c:\windows\system32\utilman.exe

Resetting Password on Linux

Method 1: Using Single-User Mode (for most Linux distributions)

  1. Restart your Linux machine.

  2. When GRUB menu appears, highlight your Linux entry and press e to edit.

  3. Find the line starting with linux and add init=/bin/bash at the end.

  4. Press Ctrl + X or F10 to boot.

  5. You will enter a root shell.

  6. Remount the root filesystem with write permission:

    mount -o remount,rw /
  7. Reset password:

    passwd [username]
  8. Enter the new password twice.

  9. Remount the filesystem as read-only:

    mount -o remount,ro /
  10. Type exec /sbin/init or reboot:

    reboot -f

Method 2: Using Live Linux USB

  1. Boot your machine using a Linux Live USB.

  2. Open terminal.

  3. Identify your root partition:

    sudo fdisk -l
  4. Mount the root partition:

    sudo mount /dev/sdXn /mnt

    Replace /dev/sdXn with your root partition.

  5. Change root to the mounted partition:

    sudo chroot /mnt
  6. Reset the password:

    passwd [username]
  7. Exit and reboot:

    exit sudo reboot

Resetting Password on Windows Server (2008, 2012, 2016, 2019, 2022)

Method 1: Using Active Directory Users and Computers (for Domain Accounts)

  1. Log in with Domain Admin account.

  2. Open Active Directory Users and Computers.

  3. Navigate to the user account.

  4. Right-click the user and select Reset Password.

  5. Enter and confirm the new password.

  6. Optionally select User must change password at next logon.

  7. Click OK.


Method 2: Using Local Administrator Account (for Local Accounts)

  1. Log in as local administrator.

  2. Open Computer Management (compmgmt.msc).

  3. Navigate to Local Users and Groups > Users.

  4. Right-click the user and select Set Password.

  5. Enter and confirm the new password.

  6. Click OK.


Method 3: Using Windows Server Installation Media (if locked out)

  1. Boot from Windows Server installation media.

  2. Select language and click Next.

  3. Click Repair your computer > Troubleshoot > Command Prompt.

  4. Replace Utility Manager with Command Prompt (same commands as Windows 10/11 method).

  5. Restart and open Command Prompt via Ease of Access button.

  6. Reset password:

    net user [username] [newpassword]
  7. Reboot and restore Utility Manager.


Final Tips

  • Always create a password reset disk or keep backup admin accounts.

  • For domain environments, use Active Directory tools for better management.

  • Always comply with your organization’s security policies when resetting passwords.

  • Consider enabling multi-factor authentication to prevent unauthorized access.

No comments: