How to give access to start,stop and restart a service like apache to a user


#1

hi dear friends
i wana give permission for start/stop/restart a service to a special user in centos 7.
i use visudo but it did not work. maybe i have problem in syntax of configurations.
i wrote below line for user “albert” :

albert ALL=NOPASSWD: /usr/bin/systemctl restart httpd.service

please help me. thank you guys.


#2

Hi Once look at below link