Q&A for How to Become Root in Linux

Return to Full Article

Search
Add New Question
  • Question
    How can I make a user a superuser?
    Community Answer
    Type in "sudo usermod -aG sudo " replacing the username of the user you want to grant superuser access.
  • Question
    How do we log in as a root in Method 3? I have my admin account and my guest account. Do I have to log as a root in terminal first?
    Community Answer
    Yes. The root account must be unlocked first if you're using Ubuntu. Follow the instructions in method two. If you're not using Ubuntu, check your distribution's documentation.
  • Question
    What is the tilde used for?
    Community Answer
    It designates a home folder (typically aliased to the current user's home folder).
  • Question
    What do I do when it says I'm, "not allowed to execute," when I type in my password after using, "sudo passwd root?"
    Community Answer
    Being a normal user, you cannot change the password of a root using a 'passwd' command, even though you are using sudo and having superuser access.You need to break the password at the grub prompt or, if you are using Ubuntu 16.04, you could do the changes in the recovery mode.
  • Question
    What would I do as a root to install an app?
    Pingu
    Top Answerer
    You would usually use your system's package manager. In Ubuntu and Debian, that's APT, and you would type a command like "sudo apt-get install nameOfTheProgramHere". Other distributions use Yum, PacMan, or some other package manager. If the package manager doesn't provide the package you want, you can compile a program from source. This is often done by writing "./configure", then "make", then "sudo make install", but this can differ and you should follow the instructions on its website. Note that programs compiled from source can be hard to update or uninstall.
  • Question
    What should I do if I get the message "passwd: Authentication token lock busy passwd: password unchanged?"
    Community Answer
    Reboot the computer. Some other process is using files that password needs to operate.
  • Question
    I cannot gain access to root using all of the method above, I'm using Ubuntu 20.
    Nithik R
    Community Answer
    You need to set the password for the root first by "sudo passwd root", enter your password once and then root's new password twice. Then type in "su -" and enter the password you just set. Another way of gaining root access is "sudo su" but this time enter your password instead of the root's.
Ask a Question

      Return to Full Article