[ale] Starting a prog. as a certain user

Robert L. Harris robert at ast.lmco.com
Thu Sep 25 10:58:45 EDT 1997


Dan Mount wrote:
> 
> I need to start a program at boot time. I'd like to run this program as the
> user "ofsuser". I guess that I would start it from rc.local, but I'm unsure of
> how to exec a program as a certain user.
> 
> I'm running RedHat 4.2
> 

In rc.local:

su - ofsuser -c "put your command here" &

Make sure you use the " or it will execute the first word of the command
only.

-- 
---------------------------------------------------------------------------
Robert L. Harris          |   If NT is the answer, 
System Engineer For Hire. \_    You don't understand the question 

Email:
Robert at ast.lmco.com
http://www.orci.com/~nomad

DISCLAIMER:
  These are MY OPINIONS ALONE.  I speak for no-one else.

perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'






More information about the Ale mailing list