Making sudo prompt for root password

When we use the sudo command, it by default asks for the password of the user as whom we executed sudo.
If we want to change this behaviour and make sudo prompt for the password of root instead of user password, we can do it by adding the flag rootpw to the file etc/sudoers

Open the file /etc/sudoers

Add the following line after the inital comment lines

Note: Please do this only if you know the root password

Save and quit.
After this the next time sudo is used remember to enter the root password and not the user password.

Follow by Email