Jump to content

How to recover root password in Ubuntu


Recommended Posts

So maybe you bootup an old Ubuntu machine and need root access but forgot what the heck you set that password to. No worries, the world hasn't come to an end.

Boot the machine up and in the GRUB menu use the arrow keys to move down to the recovery option.

NOTE: if you don't see the GRUB menu maybe because its the only operating system on your machine, hold down the SHIFT key while booting up and it will display.

NOTE: if you don't see a recovery option, use the arrow keys to select which option you would like to use as recovery and press the e key, then where its loading the kernel you just add the word single to the end of that line (example: linux /boot/vmlinuz-2.6.38-11-generic root=UUID=341392b7-4933-8b21-d7bc810a7473 ro single)

you may get a recovery menu, press the arrow key to scroll down to shell command with root and press enter

now just type: passwd and enter

enter your new root password and press enter, then enter your root password again and press enter (now its set)

type: reboot and you are good to go.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...