Stop Ubuntu from asking password

Run sudo visudo

For certain command:

username ALL = NOPASSWD: command 1
username ALL = NOPASSWD: command 1, command 2, command 3
Example
hensem ALL = NOPASSWD: /bin/systemctl restart httpd.service, /bin/kill


For everything:

username ALL=(ALL) NOPASSWD:ALL

For root:

Find the line that says

%admin ALL=(ALL) ALL

and change it to

%admin ALL=(ALL) NOPASSWD: ALL

Comments

Popular posts from this blog

Useful aliases

Enable Search Engine Friendly (Pretty URLs) in Yii2