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:
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.
No comments:
Post a Comment