Cannot netuse be used to obtain permissions in exec () of php? What should I do?

Source: Internet
Author: User
Cannot netuse be used to obtain permissions in exec () of php? Exec (netuse \ 192.168.2.102 \ ipc $ & quot; 1 & quot; user: & quot; administrator & quot ;); in this case, the exec (netuse \ 192.168.2.102 \ ipc $) cannot be connected. in this way, an ipc $ can be created, but cannot be obtained using net use in exec () of php?
Exec ('Net use \\\\ 192.168.2.102 \\ ipc $ "1"/user: "administrator "');

This cannot be connected.

Exec ('Net use \\\\ 192.168.2.102 \\ ipc $ ');
In this way, you can create an ipc $ with no administrator permission.




I just want to use the cmd command to obtain the administrator permission of the remote machine and start a service. the above content is executed in the cmd window.
Is put in the code, how should I write this net use?

------ Solution --------------------
Yes, you cannot obtain the permission.
But you can change it.
The balance product program in web mode writes the commands to be executed to the transition file.
Use a php program running in command line mode to act as a waiting process, and constantly check whether there are commands to be executed in the transition file
Execute if any

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.