How do I securely execute commands as root via a web control panel?

Posted by Chris J on Server Fault See other posts from Server Fault or by Chris J
Published on 2010-02-17T17:10:03Z Indexed on 2010/04/02 23:03 UTC
Read the original article Hit count: 320

Filed under:
|
|
|
|

I would like to build a very simple PHP based web based control panel to add and remove users to/from and add and remove sections to/from nginx config files on my linode vps (Ubuntu 8.04 LTS).

What is the most secure way of executing commands as root based on input from a web based control panel?

I am loathe to run PHP as root (even if behind an IP tables firewall) for the obvious reasons.

Suggestions welcome. It must be possible as several commercial (and bloated, for my needs) control panels offer similar functionality.

Thanks

© Server Fault or respective owner

Related posts about linux

Related posts about root