0.6.3 tricks to run task as specific user?
Scott James Remnant
scott at netsplit.com
Wed Jan 5 17:13:52 UTC 2011
Using su is probably "better" than sudo, as it's a simpler executable
- but no, there's no "better" way
While there is direct support for this coming in Upstart, it pretty
much amounts to exec'ing "su" for you, so is more like syntactic sugar
than something better
Scott
On Wed, Jan 5, 2011 at 5:11 PM, J.B. Nicholson-Owens <jbn at illinois.edu> wrote:
> Janne Karhunen wrote:
>>
>> Is there any elegant way to run task as specific user in 0.6.3?
>> Can't spot a stanza and would like to get rid of the su* trickery.
>
> Is there a preferred way to run a process as a user? I'd like to run a
> server process not as root, so this is of interest to me.
>
> I'm trying to run a radmind server (executable /usr/sbin/radmind) as the
> "radmind" user and use Upstart to keep it running as long as there is an
> active network connection.
>
> Here's the upstart job I was going to use:
>
> =========================
> #
> # Start the radmind server
> #
> description "radmind server"
> author "J.B. Nicholson-Owens <jbn at illinois.edu>"
> version "1.0"
>
> start on network
> expect fork
>
> script
> sudo -u radmind /usr/sbin/radmind
> end script
> =========================
>
> If there is a better way to do this, please let me know on this list.
> Any other tips also appreciated as I am new to Upstart.
>
> Thanks.
> --
> J.B. Nicholson-Owens, Website and Network Administrator
>
> --
> upstart-devel mailing list
> upstart-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/upstart-devel
>
More information about the upstart-devel
mailing list