On Tue, 24 Dec 2002, Mike Burger wrote:
> In a startup script?
>
Yes. See below for an example of a file I put in /etc/rc.d/init.d .
The "service" and "chkconfig" commands work the same for it as for the
startup files provided by RedHat.
> On Tue, 24 Dec 2002, Steven W. Orr wrote:
>
> > On Tue, 24 Dec 2002, Mike Burger wrote:
> >
> > =>You could use cron, instead...or you could set the program setuid to the
> > =>nonprivileged user.
> > =>
> > =>On Tue, 24 Dec 2002, Martinez, Michael - CSREES/ISTM wrote:
> > =>
> > =>> Is there a way to make a /etc/rc.d/init.d script run as a non-priviledged
> > =>> user without invoking a wrapper that uses C to invoke setuid calls?
> > =>>
> > =>> Michael Martinez
> > =>> CSREES/ISTM/USDA
> > Use su -c cmd user
> >
> >
>
>
#! /bin/sh
# chkconfig: 345 88 06
# description: Starts and stops java/net/netServer
# processname: netServer
#
#
# Source function library.
. /etc/rc.d/init.d/functions
case "$1" in
#
# Start the process.
#
'start')
su - cdmsonly -c /etc/rc.d/init.d/netServeRun
echo '.'
;;
#
# Stop the process.
#
'stop')
echo 'stopping:\c'
killproc /usr/lib/kaffe/Kaffe; echo '
netServer\c';
echo '.'
;;
#
# Usage statement.
#
*)
echo "usage: $0 {start|stop}"
exit 1
;;
esac
--
Steven Yellin
_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list