Re: startup script with non-root user

2007-01-19 Thread Don Munyak

Thanks so much Martin & Greg. I give these a try.

Don
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: startup script with non-root user

2007-01-19 Thread Martin Tournoij
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: startup script with non-root user

2007-01-19 Thread Greg Albrecht

according to rc.subr(8):

${name}_user
  User to run command as, using chroot(8).  if
  ${name}_chroot is set, otherwise uses su(1).  Only
  supported after /usr is mounted.

so in your /etc/rc.conf you could put:

hobbit_enable=YES
hobbit_user="hobbit"


-g

On 19/01/07, Don Munyak <[EMAIL PROTECTED]> 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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"




--
Greg Albrecht ([EMAIL PROTECTED])
An Indie, Hip Hop and IDM Podcast: The Letter G
http://theletterg.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


startup script with non-root user

2007-01-19 Thread Don Munyak

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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"