Forgot Your Linux Login Password?

We are going to tell you how to reset your password on any Linux distrubution. We hope it helps you 🙂 We’re going to show 3 different options for you to choose from…

First Option

This probably happened to many users of Ubuntu. What to do when you lost your login password to Ubuntu? First of all, you need to physically be in front if the computer, of course. We tried it on Ubuntu here and I changed the password


For starters, you need to press the SHIFT on the left side of your keyboard, you’ll be welcomed by a recovery menu.

You need to select the option that says “Advanced Options for Ubuntu”. When you’ve selected it, you should select the line that says “Recovery Mode”. After that, some writings will run through your screen, after you wait for a while, when you see a coloured screen, you need to select the option that says “root”


After that, you’ll be sent to the root screen.
# mount -rw -o remount /

You can write the command below to see the list of users on the operating system.
# cut -d: -f1 /etc/passwd

Once you determine the user you want to change the password of, you need to write the command below.
# passwd user_name

Then it’ll ask you for a password twice, determine your new password and then press Enter.

Second Option

By editing the related kernel on the GRUB screen (with “e” button)

ro quiet splash

Change the parameter on the related place:

rw init=/bin/bash

with the command above. Run the changes we just made with Ctrl + X. And then, to change the user password on the root console:

passwd username

Once you’ve changed the user password, input


Third Option


On the GRUB screen, get to the recovery mode part and select “root – drop to root shell prompt” from the list. Write the new password before writing the username you want to change the password of. As example

passwd username

The system will ask you for your new password twice. When you see the message “Password updated successfully” on the screen, then it means you’ve successfully updated your password.

Reboot with the command below:

reboot -f

and enter your new password.

Original article by: Eren Güney 

Leave a Reply

Your email address will not be published. Required fields are marked *