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?
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:
(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
Also, please note that this does not seem to be an encouraged configuration of an ubuntu system.
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,
- Open Terminal
- Type sudo -i
- Enter your root password
- Type passwd
- 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)