Home Ubuntu How to reset root password in Ubuntu 17.10

How to reset root password in Ubuntu 17.10

by Kiran Kumar
Published: Last Updated on

No matter you have an excellent memory, and you are a perfect organized person, it happens to everybody one day or another – forgotten password! What if it was your Ubuntu root password? Is it the end of the world? This guide will walk you through the method of resetting your lost password in Ubuntu so that you won’t lose all data.

Recover lost root password in Ubuntu 17.10

STEP 1: Shutdown the PC.

STEP 2: Power ON the computer and while at the Ubuntu Grub (boot screen), highlight Ubuntu and press ‘e’ key. If you don’t see the Grub screen, then probably you only have Ubuntu installed in your computer. In such case, Ubuntu doesn’t boot into grub to save time. All you have to do is press and hold SHIFT key at startup for GRUB to show up.

Ubuntu Grub

Ubuntu Grub

STEP 3: In the Grub’s boot menu edit mode, navigate using arrow keys and go to the line as shown below:

Edit Grub Menu

Before Editing Grub Menu

STEP 4: Edit the text to change ro quiet splash $vt_handoff to rw init=/bin/bash like shown below:

Edit Grub

After Editing Grub Menu

STEP 5: Press Ctrl X keys together. You should exit out of grub and go into command prompt root @(none):/#.

Command Prompt

Command Prompt

STEP 6: Enter passwd command and press enter key. Go ahead and enter the new password twice.

Reset Root Password in Ubuntu 17.10

Reset Root Password in Ubuntu 17.10

STEP 7: That’s it! Your new password is now set. Reboot your computer by entering the following command:

exec /sbin/init


You may also like


Jason June 3, 2018 - 2:17 PM

When i try to enter my new password it wont let me ype

brandon June 14, 2018 - 8:35 PM

password is hidden

Joseph June 16, 2018 - 5:35 PM

After password reset, in login screen it doesnt give password error but after a 1 second black screen shown, returns to login screen

Huu July 19, 2018 - 5:16 AM

it’s don’t worked with me.

Willy February 18, 2020 - 8:16 AM

In recovery mode i can not type anything so what sgould i do?

mrcnkx March 19, 2022 - 2:33 PM

ty very much! works well


Leave a Comment



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us


©2016-2023 FOSS LINUX



“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.