starting a process as another user during startup

Jean-Pierre Radley jpr at jpradley.jpr.com
Thu May 23 14:27:26 AEST 1991


In article <8646 at alpha.cam.nist.gov> coleman at cam.nist.gov (Sean Sheridan Coleman X5672) writes:
>I have a shell script currently that cron runs as a user
>called nbsnet which starts up a monitoring program and is 
>left to run throughout the day. At the end of the day, this 
>user's cron will kill the process and do some work with the
>data it received. 
>
>I take the machine down once a month for backups, etc but
>this process is never restarted ( I have reset it in cron now)
>
>What I would like to do is have the rc.local run this script
>and start up this monitoring program as a part of its startup 
>but I want it to start the process so the user is nbsnet not
>root. Is there a way to do this and if so, how?

su nbsnet -c "your_script and arguments thereto"

Jean-Pierre Radley   Unix in NYC   jpr at jpr.com   jpradley!jpr   CIS: 72160,1341



More information about the Comp.unix.questions mailing list