startup script with non-root user
Martin Tournoij
carpetsmoker at carpetsmoker.net
Fri Jan 19 23:29:35 UTC 2007
On Fri, Jan 19, 2007 at 05:30:00PM -0500, Don Munyak wrote:
> Hello,
>
> I have an application I'd like to startup at boot, however, the script
> needs to be started by a non-user account.
>
> If I put the startup script in /usr/local/etc/rc.d/hobbit.sh
>
> How do I get it to start using the user account 'hobbit'
>
> Thanks
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
--
But like the Good Book says... There's BIGGER DEALS to come!
You can use su, a very simple example:
script.sh:
su carpetsmoker startup.sh
startup.sh:
echo "Hello, I am now running as user "carpetsmoker"
set
See the su man page for more information
Hope this helps.
Martin
More information about the freebsd-questions
mailing list