Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
-1
rated 0 times [  -1] [ 0]  / answers: 1 / hits: 11161  / 2 Years ago, sat, october 22, 2022, 1:16:35

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?


More From » 12.04

 Answers
5

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.


[#29086] Sunday, October 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terose

Total Points: 185
Total Questions: 125
Total Answers: 131

Location: Venezuela
Member since Mon, Dec 13, 2021
2 Years ago
;