Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread John Nichel
Greg Donald wrote:
On Tue, 30 Nov 2004 16:50:27 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
PHP (the webserver) would have to have permission to edit the ifcfg-eth0
(eth1, eth2, etc) file, and have permission to restart the network.

sudo would probably help with the permissions requirements.
Greg's right, but if you go the sudo route (in fact any route giving 
your webserver this type of permission), read and understand the docs 
completely.  Editing the ifcfg-ethX file is one thing, but giving it the 
permission level to restart the network could lead to serious security 
issues if it's not done properly.

I'll stop now, as this can easily go waaay off topic, and can become an 
extremely long, involved thread. ;)

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 16:50:27 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
> PHP (the webserver) would have to have permission to edit the ifcfg-eth0
> (eth1, eth2, etc) file, and have permission to restart the network.

sudo would probably help with the permissions requirements.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread AndyO
John Nichel wrote:
AndyO wrote:
I'm working on a project where an engineer/user has to be able to log 
in to a device locally and change the IP address. The OS is Linux.

We want to make the interface simple and so we thought of using a 
webpage that allows the engineer/user to change the address without 
having to use the Linux tools netconfig or ifconfig.

Is it possible to use a PHP script to change the IP address?
PHP (the webserver) would have to have permission to edit the ifcfg-eth0 
(eth1, eth2, etc) file, and have permission to restart the network.

Thanks I will look in to this. Seems like a sound enough idea.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread John Nichel
AndyO wrote:
I'm working on a project where an engineer/user has to be able to log in 
to a device locally and change the IP address. The OS is Linux.

We want to make the interface simple and so we thought of using a 
webpage that allows the engineer/user to change the address without 
having to use the Linux tools netconfig or ifconfig.

Is it possible to use a PHP script to change the IP address?
PHP (the webserver) would have to have permission to edit the ifcfg-eth0 
(eth1, eth2, etc) file, and have permission to restart the network.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php