windows

Windows 10 – Changing a user's password

2 min read

Forgot your Windows password? What now?

There is a way to change your password so you can get access again.

First, unless you already have a USB stick or CD with a Live Distro, you need a computer to download one.

I usually use Xubuntu, Ubuntu or any other derivative of the latter.

After downloading the ISO file, we create a USB stick or CD to boot the PC from. On Linux you can use the dd command; on Windows, a tool such as Rufus.

We boot into the Live Linux and mount the Windows partition where the system is installed.

We go to the folder “C:\Windows\System32”

bash
    cd <mount point>/Windows/System32

find the file cmd.exe and rename it to cmd.exe.tmp

bash
    mv cmd.exe cmd.exe.tmp

find the file sethc.exe and rename it to cmd.exe

bash
    mv sethc.exe cmd.exe

then rename the file cmd.exe.tmp to sethc.exe

bash
    mv cmd.exe.tmp sethc.exe

We restart the computer, removing the USB stick or CD used to boot the Live Linux, and when we reach the login screen we press the SHIFT key 5 or 6 times, and a command prompt window appears.

In that window we run the following commands:

To see which user names exist, in particular the one(s) whose password we want to change

bash
    net user

Change the password

bash
    net user <username> <newpassword>

Afterwards, rename the files back to their original names, reversing the process described above (cmd.exe and sethc.exe).

#users#windows 10