[smokeping-users] using sudo in an alert

Ryan Becker rb14060 at gmail.com
Wed Jul 25 00:15:29 CEST 2012


Make sure that the user is allowed to execute the script without a
password.  Here's an example that you can modify to suit your
needs: techbnc ALL = NOPASSWD: /usr/sbin/csf
In this example the user techbnc is allowed to call /usr/sbin/csf without
needing a password.  What's happening is that normally when sudo is called,
it asks for the password and Smokeping has no way to provide that password.
 By adding the user to the file with NOPASSWD, they are allowed to execute
the script without being password prompted and therefore Smokeping will be
able to complete the action.

On Tue, Jul 24, 2012 at 5:35 PM, Andrew Pattison <andrum99 at gmail.com> wrote:

> I am trying to set up smokeping with an alert script. The alert script is
> called like this entry in /etc/smokeping/config.d/Alerts:
>
> to = |sudo script.py
>
> When called as simply |script.py this works fine, but with sudo the script
> does not get called. How can I get this working?
>
> Thanks
>
> Andrew.
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20120724/c4f61dc9/attachment.htm 


More information about the smokeping-users mailing list