[bf1942] web script

Ron Davis ronaldwdavis at gmail.com
Thu Jul 14 01:41:57 EDT 2005

If i understand this correctly you are asking for a process that apache 
kicks off to run a process as a differant user.

As the previous user specified:Paul Bowsher

If you use virtualhosts along with suexec you can control all scripts being 
executed on a site to be ran as any user you want. Further if you look at 
the subproces that is spawned from apache you can see if running as that 

To do this first you have to compile apache with suexec support. 
/usr/local/apache/bin/httpd -l 
to tell you if it is enabled.

Once you do that in httpd.conf you tell the system what user to execute a 
script as and where they may execute scripts from.

Also you could always shell out of the script and run the "su user -c "/bf2 
stop| start" way as well.

Hope that helps

On 7/14/05, ScratchMonkey <ScratchMonkey at matureasskickers.net> wrote:
> --On Wednesday, July 13, 2005 7:31 PM -0500 Tim Cooper
> <tim at myinternetservices.com> wrote:
> > I have a web app that executes this and another to kill the screen. The
> > problem I am having is that the users "apache" executes this and not the
> > user I need it to be
> "man sudo"
> In my /etc/sudoers I have this line:
> apache ALL = (root) NOPASSWD: /sbin/service bf2*
> This says that user apache can issue the command "/sbin/service bf2*" (the
> "*" is a wildcard to indicate that anything can follow that on the line).
> The command will run as root and no password will be prompted for. The 
> user
> apache must issue the command exactly as specified:
> sudo /sbin/service bf2 start
> sudo /sbin/service bf2 stop
> I think what you want is the same but with root replaced by whatever user
> runs the game server. You can use an alias there and then define the alias
> earlier in the file as the list of game server users.

Thanks Again,

Ron Davis 
Home: 314-521-1945
Cell: 314-393-3245
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/bf1942/attachments/20050714/be7d7180/attachment.htm>

More information about the Bf1942 mailing list