I am developing an application that requires the ability for an administrator to modify the server's IP address remotely through a web browser. The server is running OS X. I know that you can use a combination of shell_exec() and ifconfig to change the IP address, but the ifconfig command requires root access. At the command line you can use sudo along with a password, but I don't want to embed a sudo password in my script.
Does anyone have any recommendations? Is there a PHP command or script that someone has already completed to do this sort of app?
Thanks!
Changing IP Address on OS X via PHP
Moderator: General Moderators
-
mac_newbie
- Forum Newbie
- Posts: 2
- Joined: Thu Mar 17, 2005 1:31 pm
- Location: Springfield, OR
-
mac_newbie
- Forum Newbie
- Posts: 2
- Joined: Thu Mar 17, 2005 1:31 pm
- Location: Springfield, OR
Don't want to give out the sudo password
That is a good idea, however the "administator" is only the administrator of the web app. I don't want to give out the sudo password for the entire OS. Are there any other methods other then using sudo to change the IP address on OS X?
Thanks!
Thanks!