Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!news.mathworks.com!fu-berlin.de!nntp.zit.th-darmstadt.de!news.th-darmstadt.de!odb!incom!kauss.rhein-main.de!kauss.rhein-main.de!not-for-mail From: ska@kauss.rhein-main.de (Stephan Kauss) Newsgroups: comp.unix.bsd.freebsd.misc Subject: su in rc.local core Date: 23 Oct 1996 17:39:19 +0100 Organization: Stephan Kauss Lines: 42 Message-ID: <54lhnn$e9@kauss.rhein-main.de> NNTP-Posting-Host: kauss.rhein-main.de X-Newsreader: TIN [version 1.2 PL2] Hi all, I have the problem that I have to start up some programs at start time from the rc.local. The program has to run with the user permission. I insert in my rc.local su - hgsystem /usr/home/hgsystem/bin/scripts/hgstart If I boot my PC I get a su - Kill -9 message on the screen. If I try this as root (with shell prompt) it work fine. Any idea how to run a script as the right user. I alsow try to set the S bit of the script but this didn't work on FreeBSD on SUN OS and LINUX it work fine. Script hgstart : #!/bin/csh -bf # /usr/home/hgsystem/bin/scripts/dbstart Than set the S bit with chmod 4755 hgstart chown hgsystem hgstart If I call this program as root it dosn't run as hgsystem. I think FreeBSD didn't take a look in the #!/bin/csh line !!! Is there a other way to start a file from /etc/rc.local with a other permission as root ? Thanks Stephan