[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Starting a prog. as a certain user

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

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

Robert at ast.lmco.com

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

perl -e 'print