executing linux sudo command in php web page
Moderator: General Moderators
executing linux sudo command in php web page
I want to view disk information in a PHP page by executing fdisk -l command in PHP page. But only the super user can run this command.Is anyone know how to execute this command for non super user
Re: executing linux sudo command in php web page
An example:
/etc/sudoers
/etc/sudoers
Code: Select all
Cmnd_Alias NETWORKING = /bin/ping, ifconfig [0-9]* eth0
root ALL=(ALL) ALL
www-data ALL=NOPASSWD:NETWORKINGCode: Select all
sudo ping localhost -f -c4
sudo ifconfig 192.168.0.1 eth0There are 10 types of people in this world, those who understand binary and those who don't