|PHP Developers Network
|PHP and Administration of a UNIX / Linux System
|Page 1 of 1|
|Author:||devarishi [ Thu Aug 26, 2010 7:18 pm ]|
|Post subject:||PHP and Administration of a UNIX / Linux System|
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?
|Author:||VladSun [ Fri Aug 27, 2010 2:59 am ]|
|Post subject:||Re: PHP and Administration of a UNIX / Linux System|
|Page 1 of 1||All times are UTC - 5 hours|
|Powered by phpBB® Forum Software © phpBB Group