server management
Posted by: mhadjar
Posted on: 2007-03-09 12:15:00
I'm looking to code my own server management / webbased control panel via php.
This will be used for another business that demands a dedicated server and not shared like dreamhost.
Basically, i want something similar to the DH web panel - for users to add/edit/remove shell/ftp users, domains, mail, databases, etc.
I have intermediate knowledge of PHP and MySQL to at least get a head start.
This is what my plan of attack would be.
A user visits panel.domain.com which asks the user to enter their account number. The script then checks the database to see which server that account number is associated with. The script then redirects the user to lets say server 13, so it would take them to panel13.domain.com. From there they would enter their username and password to access the web panel.
A cron job will be set to run every 15 minutes or 30 minutes to execute shell scripts such as changing user passwords, adding users, removing them, etc.
Is this a good plan of attack, or does it pose security? I would prefer to run shell_exec to process commands immediately, which will also reduce the amount of server overhead. However, I can't run shell commands without running as root. Any suggestions on how I can go about doing this?
THanks!