Run bat file as specific user from php

I installed the web server and based on the HTTP request and should execute the script as another user.

So, regarding this, can I start HTTP as the user I need?

Or I can provide the password non-interactively and include something like below as the first line of the bat file.

runas /user:dmn1\user1 cmd
+4
source share
2 answers

First of all, it is not a good idea to execute bat, sh or any other files from commands that can be tricked by any means. You can use php exec () to execute system commands.

0
source

-, , , cmd , .hta, , IE.

0

Source: https://habr.com/ru/post/1658436/


All Articles