[bf1942] web script

ScratchMonkey ScratchMonkey at MatureAsskickers.net
Thu Jul 14 01:20:50 EDT 2005

--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.

More information about the Bf1942 mailing list