in reply to perl script using sudo
I think the sh in the sudo call is the problem. You probably want to change your sudo line to
`sudo /usr/local/www/cgi-bin/ntop/ntop.sh stop` or die "cannot stop ntop: $!";
That's the way you seem to have tried it from the command line in one of your later replies, so that's the way you should call it from your script as well. If the way you have it in your script right now would work (with a non-absolute path to sh) you'd give full root access to the user since they can rename whatever program they want to sh and execute it as root.
|
|---|