How to Reset Forgotten Root Password in Ubuntu 14.04

ubuntu 14.04 password reset

Sometimes it is necessary to get root access into the Ubuntu system. I was facing the issue when try to reset forgotten root password in Ubuntu 14.04 using recovery mode (Drop to root shell prompt). After done a few testing and do a research, i have found the working solution for it.

Steps to Reset Forgotten Root Password in Ubuntu 14.04

Give root password for maintenance (or type Control-D to continue)

1. First, make sure to choose the regular or default boot kernel that you always use, then press ‘e’.
reset ubuntu root password
2. Hit the down arrow key over to the “linux” option.
ubuntu root password
3. Remove the “ro” part with the backspace key, and then the following onto the end:

rw init=/bin/bash

Press Ctrl-X or F10 to boot.
ubuntu reset root password
4. Your system should able to boot up very quickly to a command prompt.
Reset Forgotten Root Password in Ubuntu
5. Use the following command to reset your password:

passwd

Once password has been set successfully, run sync command to write out data to the disk before rebooting.

sync
reboot -f

Reset Forgotten Root Password in Ubuntu

Thats all. Now you should be able to login without any issues.

5 comments
  1. Bob
    Bob
    September 11, 2014 at 3:47 am

    Last command in gray box s/b

    reboot -f

    not rebooting. It is correctly shown on the screenshot.

    Reply
  2. Jambu Blukutuk
    Jambu Blukutuk
    October 24, 2014 at 9:19 am

    Thank you very much, you save my life

    Reply
  3. bryce
    bryce
    November 28, 2014 at 10:14 am

    I have went through every step just as u had said but I get a /bin/bash: quiet: no such file or directory. …….. and 3.508683) kernel panIc- not syncing: attempted to kill init exitcode= 0x00007f00 what is wrong?

    Reply
  4. Santosh V Vambase
    Santosh V Vambase
    December 9, 2015 at 12:17 pm

    Very useful and easy approach to recover the credentials..
    Thank you..

    Reply
  5. Pushkar Pun
    Pushkar Pun
    December 31, 2016 at 11:33 am

    sync
    rebooting -f #wrong line…

    It must be reboot -f

    Reply
Leave a Reply

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

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee