Sam Sam - 8 months ago 32
Linux Question

How to execute sudo as user with root password

How can I configure Linux to see the prompt for the root password if

try to execute the following command:
$ sudo mkdir /opt/test

is part of sudoers, the terminal ask for the user password not for the root password.


In /etc/sudoers, add this line:

Defaults rootpw

Make sure you use visudo for editing this file. For more information, you can check the link