in reply to Re^2: Perl CGI ability to start linux services
in thread Perl CGI ability to start linux services

I don't see you using sudo anywhere... (that would be sudo /etc/init.d/ntpd start).

To avoid having to mess with entering passwords, it's probably best to make use of the NOPASSWD: option, e.g. something like (in /etc/sudoers):

apache localhost = NOPASSWD: /etc/init.d/ntpd

(see man sudoers for the details)

Replies are listed 'Best First'.
Re^4: Perl CGI ability to start linux services
by iphony (Acolyte) on Nov 29, 2008 at 02:54 UTC
    Thanks! This works when password is disabled.