I fucked up the server totally while trying to do this (will write about it later...because it was unfucking believable)
Anyway, I'm trying to make a PHP page where i can edit iptables, to make it easier and faster to forward ports on the server. The problem is that I need to be able to run the PHP functions as root either by not having to type in the password or that there is some kind of way that I can sudo the command and send the password as an argument at the same time...
Anyone familiar with this?
[Solved][Help] Run PHP function as root?
[Solved][Help] Run PHP function as root?
Last edited by ayu on 24 May 2008, 06:27, edited 1 time in total.
"The best place to hide a tree, is in a forest"
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
hm....have a look at this one:
http://freshmeat.net/projects/firewalladmin/
but I highly recommend to use this (and any other php script that has root privileges) only locally...never remotely (at least not without password protection)...
http://freshmeat.net/projects/firewalladmin/
but I highly recommend to use this (and any other php script that has root privileges) only locally...never remotely (at least not without password protection)...