I lost my root/super user password on Ubuntu server. I tried to boot in a recovery mode and select option drop to root shell.

But it is always asks for:

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

and I don't remember it.


Try Control-D when it prompts you for the root password. If that doesn't work, then try this:


Then scroll down to "Alternate Root Shell Method".

  • Thanks for that, it helped me. It was a little "grub" window different from mine, but i could use it to fix mine. Thanks alot. – MohammedSimba Dec 24 '13 at 17:11
  1. Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
  2. As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
  3. You will see a GRUB boot prompt - press "e" to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots).
  4. Find the kernel line (starts with linux /boot/) and add init="/bin/bash" at the end of the line.
  5. Press CTRL-X or F10 to boot.
  6. System will boot and you will see the root prompt. Type mount -rw -o remount / and then passwd to change the root password and then reboot again.

Reference: https://www.vultr.com/docs/boot-into-single-user-mode-reset-root-password

  • Note that these instructions are specifically about a Vultr cloud server. They may not apply to a local machine running a standard Ubuntu image, but I'm not sure. – wjandrea Jan 2 '17 at 5:40
  • 2
    If you are using it on a local machine you have to start it with step 3 and onwards, thanks. – Saqib Ahmed Jan 2 '17 at 6:45

There is no root password in Ubuntu. This is a security feature: it's impossible to log in as root, no password means there is no password that can be cracked.

When prompted for the password in recovery mode, just hit [enter].

  • I know i can't log in as a root, i meant the administrator account of mine, i forgot it. and bout the root, when it asks me for the password, i did put to the role "root" a password, i don't remember it either!! – MohammedSimba Dec 24 '13 at 17:07
  • I can't login as root to a desktop, but in case of server "which i am asking for" it is normal to login as a root!. – MohammedSimba Dec 24 '13 at 17:25
  • 1
    It's not impossible to log in as root... – troylatroy Dec 24 '13 at 18:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.