kennygadams
Programmer
Hi,
Is it possible to stop, start, restart root processes with a perl script that doesn't run as root?
I only want to run the sendmail program if a visitor uses our form to send an email. Otherwise I want it turned off because sendmail running with mailscanner puts a heavy load on our server.
The following code is what I used and it doesn't work.
$feedback returns: su - RootPasswordGoesHere "service sendmail restart"
Thanks,
Kenny
Is it possible to stop, start, restart root processes with a perl script that doesn't run as root?
I only want to run the sendmail program if a visitor uses our form to send an email. Otherwise I want it turned off because sendmail running with mailscanner puts a heavy load on our server.
The following code is what I used and it doesn't work.
Code:
$feedback = ("su - RootPasswordGoesHere \"service sendmail restart\"");
$feedback returns: su - RootPasswordGoesHere "service sendmail restart"
Thanks,
Kenny