permission to restart a service

Mike Burger mburger at bubbanfriends.org
Mon Aug 30 03:35:51 UTC 2004


On Sun, 29 Aug 2004, Daniel Chenard wrote:

> I want to give to some users the permission to start, restart and stop
> some services like apache and or mysql.
> 
> I dont want to use webmin for that.
> 
> Someone know if I can do that??
> 
> If yes, how can I do that??

Use sudo access.

Adding something like this to the /etc/sudoers file should handle it:

user ALL=(ALL) NOPASSWD:/path/to/command parameter1 parameter2

Or

%group ALL=(ALL) NOPASSWD:/path/to/command parameter1 parameter2

The second example allows you to set up a group, put specific users into 
that group, and allows any member of the group to run the specified 
command.  

In both examples, the "NOPASSWD" option tells sudo not to ask for the 
users' passwords.  If you want the system to ask for the users' passwords, 
just remove the "NOPASSWD:" from the entry.

Regardless of the entry, you can either "vi /etc/sudoers" or run 
"/usr/sbin/visudoers" to accomplish the same thing.

-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit 
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a 
message to:

site-update-request at bubbanfriends.org

with a message of: 

subscribe





More information about the fedora-list mailing list