nerve
04-23-2004, 01:52 PM
I am trying to figure out how to exec system commands from a web page by calling a cgi perl script - the problem I am having is that it seems I can only exec as the web services user and I need to be exec'ing as root (Yes I am aware of the security implications of this).
Any ideas on how to either SU in the script or otherwise overcome this problem?
As an example I would like to restart sendmail using the following command from a button on a website:
/etc/rc.d/init.d/sendmail restart
Which requires I be root.
Any ideas on how to either SU in the script or otherwise overcome this problem?
As an example I would like to restart sendmail using the following command from a button on a website:
/etc/rc.d/init.d/sendmail restart
Which requires I be root.