I'm having a problem with Apache HTTPD: I have a PHP application that executes the Windows command
shutdown -s -m \\<some machine> -t 0
It is used to shutdown unused servers in a network from a remote location.
The problem is, that I need to run that PHP app under a user account that also exists on the target machine and has the right privileges to execute the shutdown. I tried to run the Apache service that handles the PHP (php5_module) with an account that can execute the remote command (I tested it on the command line manually with that same account and it worked.) by setting
User XYZ
in httpd.conf but that didn't help.
The PHP script in question works perfectly if executed directly from the command line while logged in with the correctly privileged user account. If executed by the webserver, the called "shutdown" command responds with "Access denied".
Any suggestions?