Background:
I have a development machine with LAMP setup. Several developers would access the machine from time to time. Every time they make some change in a configuration file they will need to restart the apache server using sudo service apache restart
or sudo /etc/init.d/apache2 restart
The Question:
What I want now is that every developer who accesses the machine does not have a sudo access to everything. Rather, he/she should only be able to run the service
command using sudo and nothing else. Is it possible to do that?
web
group can start/stop any service, and this is not what you want, I think. The solution should be to put the exact command (also with parameters) in/etc/sudoers
. – enzotib Dec 27 '11 at 10:23/usr/bin/service apache2
is it? – Ankit Dec 27 '11 at 12:08/usr/bin/service apache2 *
– enzotib Dec 27 '11 at 13:10/usr/sbin/service
– Erfan May 26 '16 at 13:19