Php uses sudo to obtain ifconfigeth0down permission solution
Source: Internet
Author: User
Php uses sudo to obtain the ifconfigeth0down permission. I have already opened many posts, but I really can't achieve it. I hope you can give me some advice, even if it's materials. phpsudo's permission acquisition is actually unreliable on the oknet, I am like this: sudogedit/etc/sudo php gets the ifconfig eth0 down permission through sudo
I have already opened many posts, but I really can't achieve it. I hope you can give me some advice, even if it's materials. If php sudo has the permission, it's really unreliable on the Internet.
------ Solution --------------------
I am like this: after sudo gedit/etc/sudoers is modified, the sudo password is not required.
Http://jingyan.baidu.com/article/495ba84135a16738b30eded1.html
------ Solution --------------------
The answer is
1. create a file, such as pw.txt, to save your root password. for example, the password is 1234.
Remember that only 1234 of the file content is needed
Disable Nic normally
------ Solution --------------------
As you have done, isn't the user protection of the operating system actually a false one?
Put the operations you need into the shell file and execute them in the waiting process or scheduled task.
Check whether there is a start signal first. if not, do not run it.
Generally, the startup signal can be used as a file and can be written by php in web mode.
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.