|
From: Andrew <li...@se...> - 2005-02-16 01:53:47
|
I'm having real problems trying to get my processes to run as another user other than root. I'm running Solaris 8 and roots shell is sh. My user i'm trying to run as has a shell of csh. I have even taken out everything out of its environment to rule that out of the problem. My scripts work just fine when I run them from the command line. I have it set up like so: /etc/init.d/myapp -> linked to /home/myuser/myapp /etc/rc3.d/S99myapp -> linked to ../init.d/myapp I can either just fine from the command line: # su - root # /etc/init.d/myapp start # /etc/rc3.d/S99myapp start However, when I reboot the machine, I see the message "Starting Application Name..." message from the wrapper, but when I get to the command prompt and run: #/etc/init.d/myapp status It isn't running. There is nothing written to my logs (both the wrapper.log or /var/adm/messages). If I set RUN_AS_USER to root (or comment it out), it works fine. I have tried this on 2 different machines, with different users, with NIS users and local users, etc. I have put a redirect to a file after the su command. All i see in there is the rest of the output from the boot process for some reason. I see "Starting OpenWindows in 5 seconds, control C to stop." I have tried running just the complete su command and that works fine as well. I have also changed all my paths in all my config files to be absolute. I'm at a loss...any help in what I can try to debug it would be great. Andrew |