As the topic says:
How do I give permission to a logged in user to stop/start a specific service without entering a root/sudo password?
So they can do a simple "service SomeService stop|start"
It is for a headless Ubuntu server.
As the topic says:
How do I give permission to a logged in user to stop/start a specific service without entering a root/sudo password?
So they can do a simple "service SomeService stop|start"
It is for a headless Ubuntu server.
I'm not sure...but I have an inkling if you read up on visudo ('man visudo') you'd probably find what you're looking for.
probably not a good idea to let all users access to root commands.
Suggest this article is something like what you want - effectively it gives certain users access to sudo but for specific services.
No, access to root services for everyone is defenitly NOT what I want
I'll try to clarify it a bit:
I want to allow a user to run a command that will stop/start a specific service. I do not want users to have access to anything else than that without using sudo as they normally would. I have had a look at the sudoers file already and it does look like the correct way but I'm not sure how to accomplish it and I might accidentally allow more than what I'm looking for without some guidance![]()
Great links: Tutorials & Tips Forum - GNOME System Administration Guide - Bash-Scripting Guide
Remember: Please mark your thread as [ SOLVED ] if you found a working solution!
It does seem that sudo is the correct way to accomplish what I want. I had a look at sudo's homepage and found some good examples.
I'll mark the thread as solved and post the answer if it works out![]()
Great links: Tutorials & Tips Forum - GNOME System Administration Guide - Bash-Scripting Guide
Remember: Please mark your thread as [ SOLVED ] if you found a working solution!
Okay i found a way
Edited the sudoers file ("sudo visudo") and added something like this:
This will allow the user to run "sudo /usr/sbin/service ServiceName" with any or zero following attributes (ie. start|stop).Code:USER ALL = NOPASSWD: /usr/sbin/service ServiceName *
I also learned something new:
This will first run "service ServiceName stop" and then "service ServiceName start". NiceCode:service ServiceName --full-restart![]()
Last edited by TheForumTroll; June 9th, 2010 at 01:19 AM. Reason: Solved!
Great links: Tutorials & Tips Forum - GNOME System Administration Guide - Bash-Scripting Guide
Remember: Please mark your thread as [ SOLVED ] if you found a working solution!
Bookmarks