How to Reset Forgotten Root Password in Ubuntu 14.04

Share this Article :

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.

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’.
ubuntu14-root-recovery-01
2. Hit the down arrow key over to the “linux” option.
ubuntu14-root-recovery-02
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.
ubuntu14-root-recovery-03
4. Your system should able to boot up very quickly to a command prompt.
ubuntu14-root-recovery-04
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
rebooting -f

ubuntu14-root-recovery-05

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

4 Comments

  1. Bob
  2. Jambu Blukutuk
  3. bryce
  4. Santosh V Vambase

Leave a Reply