How to change password in ubuntu in case you lost it?

Step 1:

You have to reboot into recovery mode.

If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.

Step 2:

After you select recovery mode and wait for all the boot-up processes to finish, you’ll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

Step 3:

In recent versions of Ubuntu, the filesystem is mounted as read-only, so you need to enter the follow command to get it to remount as read-write, which will allow you to make changes.

mount -o rw,remount /
ls /home
passwd username

Then it will ask for the new password. Give that and your problem will be solved . 🙂

Now the password should be reset. Message will be displayed:

passwd: password updated successfully.

Step 4:

Type exit to return to the recovery menu.

Step 5:

After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

Advertisements

About Priyanka Kapoor

Simple, Hardworking & friendly.....
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to How to change password in ubuntu in case you lost it?

  1. 童貞 says:

    Err? Can’t you just do this in a terminal in normal Ubuntu? Why do you need recovery mode?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s