pi@raspberrypi:~ $ echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers
www-data ALL = NOPASSWD : ALL
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# sudo -u www-data pihole enable
::: Blocking has been enabled!
root@raspberrypi:/home/pi# exit
exit
pi@raspberrypi:~ $ sudo sed -i '$ d' /etc/sudoers
pi@raspberrypi:~ $
reboot my Pi?