Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up an ubuntu-server in order to host the virtuoso server.

I want to setup a simple user (without sudo) account that will (only) be able to run

/etc/init.d/virtuoso-opensource-6.1 [start|stop|restart]

(to be able to administer the virtuoso server, but not other system resources)

i guess this is similar/equivalent to any service e.g. apache2, mysql, etc

is there an option to limit access to only the virtuoso service, or an option to access to all the init.d scripts, but not the rest of the system?

share|improve this question
up vote 9 down vote accepted

You can customize which commands the user can run via sudo in /etc/sudoers (using visudo):

username: ALL = /etc/init.d/virtuoso 
share|improve this answer
It works, great! thanks a lot – jimkont Oct 14 '10 at 13:46

Your question seems to assume that sudo is an all or nothing grant of root privilege because that is how it is often used.

With configuration you can arrange for very tight control over what sudoers can and can't do.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.