3

I have forgotten my root password after changing it. Is there a way to recover or reset it. I really do not want to reinstall Ubuntu again.

4
  • 1
    Why would this getting a up vote? Duplicate askubuntu.com/questions/24006/…
    – gherkin
    Apr 27, 2014 at 23:42
  • By default, Ubuntu does not have a root password. In fact, the root account is disabled for all intents and purposes. Ubuntu sets up the user you create with SUDO access. When you execute a command that requires elevated privileges you must use SUDO. If it is a GUI (Gnome, KDE, etc.) command, you are often prompted to enter your own password again.
    – 0xSheepdog
    Apr 27, 2014 at 23:44
  • So, do you still need to change your root password? Did you create one and enable the root account? Did you disable/remove SUDO access for your first user?
    – 0xSheepdog
    Apr 27, 2014 at 23:45
  • Does this answer your question? How do I reset a lost administrative password?
    – Fabby
    Aug 17, 2023 at 13:48

1 Answer 1

3

See my comments, but if you haven't done anything too drastic, this should fix your problem.

  1. Press the super/windows key and launch the terminal.

    terminal
    
  2. When the Gnome Terminal opens, type the following:

    $  sudo passwd root
    
  3. sudo will ask you to authenticate with your password. This is your regular user password you use to log in.

  4. Enter the new password you want to use for the root account, and press enter. The system will ask you to enter it again. Make sure you type it the same both times.

  5. If all went well, you will see the message:

    passwd: password updated successfully
    

As I said in my comments, the root account is typically disabled by default in Ubuntu.

I hope this helps you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .