Moderator: General Moderators
Please suggest some tasks of an administrative level that we can use PHP and call other Scripts to automate them.
It's a kind of homework for me to figure out how to automate those tasks. Your useful suggestions are most welcomed.
This would help me face interviews more effectively when they present such scenerios. For example, recenlt I was asked this question in an interview:
Using PHP and Shell Script design and develop a Web Interface to change or set the IP Address and Subnet Mask of the UNIX / Linux System. The related services must be restarted automatically for the new IP Address and Subnet Mask to take effect. No user name and password should be asked for when using that Web Interface. How would you do it?
One more thing, how do we make sure that a particular script (PHP, Shell Script, Perl, etc.) that contains administrative commands, which only the root user can issue, will work fine when such a script is called / accessed by non-priveleged users?
For example, we have a Shell Script (let's name it emptyTmp.sh) that empties /tmp directory. Now we want every user to run that script so that a non-priveleged user would not need any root priveleges to achieve this task. How do we go about it?
We can place a script in a directory such as /usr/bin and /bin for every one to access a script. But the commands that require root priveleges and have been written in scripts would work without any permission issue?
Code: Select all