how to find out root password

195,174

Solution 1

Simple answer : You can't find the root password, If you could it would break the security model.

Also, by default root does not have a password which prevents you from logging in as root.

If you want to enable root login see this post. How to enable root login? However its not recommended see here

If you have lost the password of all Administrative users see this post on how to fix: How do I reset a lost administrative password?

Another option is sudo -i with your password which runs a session as root

Also take a look here RootSudo

Solution 2

While the answer given by A J is technically correct, you should use sudo su to switch to the root user. If for some reason you must use his answer, please do sudo bash --login

Solution 3

Root login is disabled by default in ubuntu. You can switch to root with

sudo bash

and then give it your personal password.

Share:
195,174

Related videos on Youtube

nick
Author by

nick

Updated on September 18, 2022

Comments

  • nick
    nick over 1 year

    I just installed ubuntu desktop 13.04

    I need the root access and need to know the root password During installation, I left it blank.

    How can find out my root password ?

    Thanks. somner

    • StackExchange User
      StackExchange User almost 11 years
      @Radu Nope, not a duplicate. While the title might be misleading, the OP never actually set one.
    • Radu Rădeanu
      Radu Rădeanu almost 11 years
      @IanCarroll I said possible, I didn't decided that is it :)
    • Thomas Ward
      Thomas Ward almost 11 years
      @IanCarroll the answer on the duplicate is still 100% accurate, because that answer will answer here. If they need root, they can use sudo to run commands as superuser, when using the user that was configured at installation time. The duplicate status is accurate and correct as a result.
    • StackExchange User
      StackExchange User almost 11 years
      Ok, fair enough.
  • Radu Rădeanu
    Radu Rădeanu almost 11 years
    Why? I need some arguments.
  • StackExchange User
    StackExchange User almost 11 years
    --login will present you with a login-type shell instead of something simulated.
  • Bobbbay
    Bobbbay about 3 years
    -1, this is a bad practice. What if the user uses a different shell? Or, what if root uses a different shell than the user? It's neither uncommon nor a bad idea. sudo su, as mentioned by @StackExchange User, or sudo -s are much better alternatives. (thank you for coming to my ted talk).
  • A J Rossington
    A J Rossington about 3 years
    sudo bash gives you a new shell and therefore a new command history - keeping my normal work separate from those run as "root". If the user had enabled the root account AND changed the shell being used by root then it's unlikely they would be asking this question. As is often the case, mileage may vary but sudo bash would provide root access as well as allowing the user to enable and set a password for the real root user.
  • Bobbbay
    Bobbbay about 3 years
    Fair enough. You provide some good points, so to each their own!