2

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.

  • 1
    Why would this getting a up vote? Duplicate askubuntu.com/questions/24006/… – gherkin Apr 27 '14 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 '14 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 '14 at 23:45
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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