Automating Linux Administration through Web Interface

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
devarishi
Forum Contributor
Posts: 101
Joined: Fri Feb 05, 2010 7:15 pm

Automating Linux Administration through Web Interface

Post by devarishi »

Hi,


The question that I am posting here is quite interesting as it was asked in the interview I attended today. And, honestly, I could not provide a solution.

Ok, here goes the problem statement:

Design a Web Interface that has three text fields:

Code: Select all

IP Address:
Subnet Mask:
Default Gateway:
And a button:

Code: Select all

Submit
When we click the Submit button, the two entries must be set in the concerned files and then the network service must be restarted to bring the new IP Address, Subnet Mask, and Default Gateway in effect.

As we all know that these settings can be done by the root user or a user who has those priveleges.

So, finally, how can we achieve it?

The complete web interface needs to be done only in PHP. Some Shell Script can be used if required.
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Automating Linux Administration through Web Interface

Post by mikosiko »

Post Reply