Operating System - HP-UX
1834285 Members
2232 Online
110066 Solutions
New Discussion

How to have rc start a process as another user

 
SOLVED
Go to solution
Brad Marks
Super Advisor

How to have rc start a process as another user

Any processes started at reboot by /sbin/rc are started by 'root'. Is there a way (maybe by using 'su') to have a process show as started by another user?

Any help would be geatly appreciated.
Thanks,
Brad
It's not impossible -- it'll just cost more...
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor
Solution

Re: How to have rc start a process as another user

Hi Brad,

Yes. Use the -c flag with su. For ex.,

...
'start')
su - oracle -c dbstart
;;
...

Make sure dbstart is a script to start the database and is in the default path of 'oracle' user.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Brad Marks
Super Advisor

Re: How to have rc start a process as another user

Sri,
Thanks much for your help. It works wonderfully!
Regards,
Brad
It's not impossible -- it'll just cost more...