I have a Non Root User abc
and want to give the user sudo
rights only to restart
, start
or stop
– mysqld service
. i.e sudo service mysqld restart
. How can I do it so?
I would like to do the same to usergroup too!!
rootservicesudo
I have a Non Root User abc
and want to give the user sudo
rights only to restart
, start
or stop
– mysqld service
. i.e sudo service mysqld restart
. How can I do it so?
I would like to do the same to usergroup too!!
Best Answer
You need to add the following lines in /etc/sudoers
this config will allow dba01 user to execute all three commands.
Now here is the output
If you try to run any other service