Allowing users to run specific scripts as root

From Notes_Wiki
Revision as of 06:15, 21 August 2018 by Saurabh (talk | contribs)

<yambe:breadcrumb self="Allowing users to run specific scripts as root">Sudo configuration|Sudo configuration</yambe:breadcrumb>

Allowing users to run specific scripts as root

We can configure sudo with lines, like:

saurabh ALL= NOPASSWD:/home/saurabh/Desktop/test.sh

to allow user saurabh to run script 'test.sh' and nothing else with sudo command. User would be able to run script without supplying user password hence calling of script can be automated using users '.bash_rc' or '.bash_profile' files.




<yambe:breadcrumb self="Allowing users to run specific scripts as root">Sudo configuration|Sudo configuration</yambe:breadcrumb>