sudo NOPASSWD for particular paths

0

How can I enable NOPASSWD for a user to do anything in several paths?

For instance read/write/execute any file in /etc/init.d and /opt/?

bagrat

Posted 2015-06-17T12:02:13.037

Reputation: 103

Answers

2

Please add the following at the end of your /etc/sudoers file:

username ALL=(ALL)NOPASSWD:/etc/init.d/*,/opt/*

AirPett

Posted 2015-06-17T12:02:13.037

Reputation: 151