Whenever I use the sudo su command to work as root, it does not ask my root password. How can I make it prompt for root password?

  • Not required and not recommended. help.ubuntu.com/community/RootSudo – oldfred Oct 10 '13 at 19:48
  • That just changes the root users password. The OP wants to be prompted for their password. Do you have a password for your account – Dan Oct 10 '13 at 19:49

First, set up a password for root, for example with sudo passwd. Then turn on a flag in /etc/sudoers file by running sudo visudo and adding the line:

Defaults        rootpw

(If you haven't modified the sudoers file before, you can put it next to the other Defaults clauses.)

Before committing to this specific setting, please consult man 5 sudoers, specifically the options rootpw, runaspw and targetpw.

Also, please note that this does not seem to be an encouraged configuration of an ubuntu system.


Using sudo will never ask for the root password. It will only ever ask for your password. That's the whole point of how it works.

You can set the password for the root user, but sudo su will never ask for it.


It's a pretty simple answer but here I go,

  1. Open Terminal
  2. Type sudo -i
  3. Enter your root password
  4. Type passwd
  5. You can now login as root

Ubuntu's Unity does not seem to like a direct root login and it's very insecure to leave the account unlocked like this...


Step 1: Open terminal Step 2: Type passwd Step 3: Set your Unix password e.g.(abcdefg)

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.