This setting is done in the /etc/sudoers file, which drives sudoers to use default security policy plugin for the sudo command under the user privilege specification section.
To allow a user (naim
in the example below) to run all commands using sudo without a password, open the sudoers file:
echo 'naim ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
OR
sudo visudo
And add the following line:
naim ALL=(ALL) NOPASSWD: ALL