|
From: Stephen S. <scs...@gm...> - 2005-02-17 12:55:21
|
I don't mean to be dense or anything, but we're using Linux with wrapper, and doing "su --command=" in a simple script placed in /etc/init.d that calls out to the other script seems to do the trick: ... start) su - myuser --command=/home/myuser/myapp start ... Never tried this RUN_AS_USER thing, but it seems to me that Unix/Linux have built-in commands to accomplish what it is you're trying to accomplish anyway.. -Stephen. On Wed, 16 Feb 2005 20:39:22 -0800 Andrew Serff <an...@se...> wrote: > To: wra...@li... > Subject: [Wrapper-user] Running Process as another user (RUN_AS_USER) > Reply-To: wra...@li... > > 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 |