Starting a service as a non root user

I am trying to script the deployment of an application but I need to restart a service running under ubuntu upstart which requires you to run it as sudo. Is there a way to restart a service controlled by upstart without being a sudo user?

1 Reply

@ollietrex:

I am trying to script the deployment of an application but I need to restart a service running under ubuntu upstart which requires you to run it as sudo. Is there a way to restart a service controlled by upstart without being a sudo user?

I don't think so. But you can setup your sudoers so that the user who needs to restart the service can run only that restart script as root, and do so without entering a password.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct