5.3 - starting a process as a diff user
Nathan Kinkade
nkinkade at ub.edu.bz
Thu Jan 6 08:07:55 PST 2005
On Thu, Jan 06, 2005 at 08:05:41AM -0600, J.D. Bronson wrote:
> I have a daemon that I need to start at boot under
> /usr/local/etc/rc.d
>
> and I need it to run as a specific user.
>
> Currently, from root, I su - {userid} and then launch it
> and then log out.
>
> Can I make this automated in /usr/local/etc/rc.d and if so how?
>
> Thanks :)
>
> -JEFF
You can use su(1) to do this, too. Look into the -c option. So,
someting in your script like:
su someuser -c "/usr/bin/someprogram"
... should do what you need.
Nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050106/fe892014/attachment.bin
More information about the freebsd-questions
mailing list