still having problems, can anyone shed any light?
I don't know why sudo
is asking for www-data
's password when it's set to not require a password on pihole
commands:
# /etc/sudoers.d/pihole
# ...snip...
www-data ALL=NOPASSWD: /usr/local/bin/pihole
Then only thing I can think of is that it's not actually executing /usr/local/bin/pihole
, but trying to execute something else. That means that either pihole
is not stored in that location, or something is trying to run non-pihole
commands as sudo (bad). What is the output of which pihole
?
hi again,
pi@raspberrypi:~ $ which pihole
/usr/local/bin/pihole
Do you think a full uninstall and reinstall is worth a shot?
If so, how can i do it to enusre myPi is 100% free of pihole?
The uninstaller needs some more love, especially in terms of removing FTL. If you're able to, I'd suggest a full re-install of Raspbian. Otherwise, go through the uninstaller and do these extra (untested) steps:
sudo service pihole-FTL stop
sudo rm /usr/bin/pihole-FTL
sudo rm /etc/init.d/pihole-FTL
You could try:
sudo -s
sudo -u www-data pihole enable
exit
and have a look what that says
as my system runs other 'things' id ratehr not re-install for this.
Ill try the below commands from @DL6ER
it asks me for a password...i enter my root pass and no good?
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# sudo -u www-data pihole enable
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for www-data:
Try:
echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers
sudo -s
sudo -u www-data pihole enable
exit
sudo sed -i '$ d' /etc/sudoers
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?
Nothing fixed yet so reboot is no use.
Try run below one and after, check if fixes anything (FYI, it will add a line to the sudoers file):
echo 'www-data ALL = NOPASSWD : ALL' | sudo tee -a /etc/sudoers
If it didnt fix anything, run below one to delete that line again (undo):
sudo sed -i '$ d' /etc/sudoers
OK, so i seem to be able to make changes in adin page, aqnd they look to be saving.
but, i still see adverts in my chrome on laptop....i have not set up the DNS server manually on the laptop.
i also see adverts on android device, with no dns set manually...id like to avoid this?
i guess a solution would be to use pi-hole as dhcp server?
Setup DNS manually first on the laptop to see if works.
Below one should display the Pi-Hole admin page and if not, something is still wrong:
Ps. when you activate the DHCP services on Pi-Hole (make sure router DHCP server is disabled first) , the DHCP leases need renewal on the clients.
Either disconnect network and reconnect or reboot the clients.
thanks for your help.
if i set DNS manually on laptop, adverts seem to be blocked.
http://pi.hole/admin/
gives me a 404 error. But i have changed the port from the default 80 as it was interfering with my home assistant install...emulated hue componenet requires port 80
A little bit more work but you can configure the Pi to have two IP addresses.
So Pi-Hole can bind to the first IP address (recommended) and the other port 80 service could bind to the second IP addrerss.
Have a look at below one how its done with lighttpd and nginx (both competing for port 80):
whats the benefit of doing this method?
i simply changed the lighttpd.conf
file in /etc/lighttpd
Redirected ads will hit port 80, and we can't change that. So if you set up a dedicated Pi-hole IP address, then the blocked ads will be handled by the Pi-hole instead of the hue component setup you have on port 80 right now.
more problems with pi-hole
settings changed on the web interface are not being saved
eg, changing the upstream dns servers?
i can tick / untick boxes, click save and i get the confirmation message, but the boxes are still in their original stateim actually trying to set the dhcp server to on, but see the same behavior.
i have tried on multiple platforms, on multiple devices and still cannot get settings to be saved
i have alos ran
sudo puhole -r
and selectedrepair
and no joy
i have cleared browser cache, and rebooted my pi.
all with no successhas anyone seen this?
a ok, so even having changed server.port = 8017
in /etc/lighttpd/lighttpd.conf
ads are still sent to port 80?
Affirmative.
123456789
Affirmative.
copy that....
and, also
123456789
what!?!
Messages should be at least 20 characters long