PiHole failure

  • I upgraded to 5 a couple of weeks ago and for the most part my docker containers have started without issue once I corrected some issues that I had with Docker after the upgrade.


    The exception to this is PiHole. I had been running this for years but then it would not load after the update. This morning I had some time so I went ahead and tried to create a brand new installation by following one of the guides. Sure enough, I am getting the same exact errors that I got in the initial installation.


    I first create macvlan:

    Code
    docker network create -d macvlan \
    --subnet=192.168.1.0/24 \
    --gateway=192.168.1.1 \
    -o parent=enp6s0f1 pihole_net

    That seemed to go well:








    I've gone down many rabbit holes with the "sudoers policy" - every fix I've tried on the internet did not fix it. Is that even the issue or is that just a symptom?
    The other thing that stuck out is that there is a reference to "eth0". Does it think that is the ID of my network interface? The ID of the interface is enp6s0f1.


    Thanks in advance!

  • This

    Code
    -1 }">sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
     -1 }">sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
     -1 }">sudo: fatal error, unable to load plugins
     -1 }">::: Testing pihole-FTL DNS: [cont-init.d] 20-start.sh: exited 1.

    makes the container (s6 shut down and restart). So you need to fix this and then the container starts up.

    Did you try this: https://github.com/pi-hole/doc…70#issuecomment-854099665


    Do you have a different error message now?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thank you again - I glossed right over that specific comment.


    Here is the log from when I issued the command


  • Please use portainer and deploy a pihole.yaml file in the portainer stack, is the easy way to deply dockers and yaml files can be backup in a safe place for future reinstall.


    example in my signature.

  • I think I had permissions issues on my config folder. I seem to have worked past those but now I am getting errors on sudoers.



    Several proposed solutions say to chmod that file - I have tried a number of variations of this (

    Code
    chmod 555 /etc/sudoers

    But I am still getting the same error. Any ideas would be greatly appreciated.

  • Code
    root@omv:~# ls -l /etc/sudoers
    -r--r----- 1 root root 752 Nov 10  2018 /etc/sudoers
    root@omv:~#


    This is how it should be. chmod 440 /etc/sudoers inside the container

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Code
    root@omv:~# ls -l /etc/sudoers
    -r--r----- 1 root root 752 Nov 10  2018 /etc/sudoers
    root@omv:~#


    This is how it should be. chmod 440 /etc/sudoers inside the container

    Thanks for this. Mine already looked like that:


    -r--r----- 1 root root 669 Jun 5 2017 /etc/sudoers

  • The error messages says something different (inside the container)

    Code
    -1 }">2022-01-23T15:50:10.451986122Z sudo: /etc/sudoers is world writable

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • The error messages says something different (inside the container)

    Code
    -1 }">2022-01-23T15:50:10.451986122Z sudo: /etc/sudoers is world writable

    So are you saying that it wouldn't say this if the properties were what I posted in previous post? I just went through and re-started the container and checked the permissions again - everything was the same as what I posted previously. Any ideas?

  • This is strange, it only says this, if the permissions are not right. How did you check?

    Log into the container and ls -l /etc/sudoers

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • This is strange, it only says this, if the permissions are not right. How did you check?

    Log into the container and ls -l /etc/sudoers

    I am logged in via putty. I just ran it again:


    Code
    root@HAL:/srv/dev-disk-by-label-Docker/AppData/Pi-hole# ls -l /etc/sudoers
    -r--r----- 1 root root 669 Jun  5  2017 /etc/sudoers
    root@HAL:/srv/dev-disk-by-label-Docker/AppData/Pi-hole#
  • You are checking the permissions inside the host, not the docker container.


    docker exec <name_of_your_container> ls -l /etc/sudo

    or open a shell into the container with portainer or whatever you use to define containers.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • or post your stack and I will show you where the file is on your disk on the host.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • You are checking the permissions inside the host, not the docker container.


    docker exec <name_of_your_container> ls -l /etc/sudo

    or open a shell into the container with portainer or whatever you use to define containers.

    Ah, I see now. So is this the root of the problem?


    Code
    root@HAL:~# root@HAL:~# docker exec a4cc576ecf3ebbe23736f233fb4e1239ecc66e4bb2d904eb501a2036cc7902b8 ls -l /etc/sudo
    -bash: root@HAL:~#: command not found
    root@HAL:~# ls: cannot access '/etc/sudo': No such file or directory



  • We are getting closer, but are not there. You mounted a volume to the container, which contains the files.

    How did you setup the container (docker-compose, portainer, ...). fro mthe tutorial you linked:


    Code
     volumes:
    - './etc-pihole/:/etc/pihole/'
    - './etc-dnsmasq.d/:/etc/dnsmasq.d/'


    The files in there are the problem, wherever you put them.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • We are getting closer, but are not there. You mounted a volume to the container, which contains the files.

    How did you setup the container (docker-compose, portainer, ...). fro mthe tutorial you linked:


    Code
     volumes:
    - './etc-pihole/:/etc/pihole/'
    - './etc-dnsmasq.d/:/etc/dnsmasq.d/'


    The files in there are the problem, wherever you put them.

    I set it up using the tutorial that I linked earlier. I just ran the image and started filling in values for the container.



  • Your 2nd volume is wrong.


    You're better off stopping the container, deleting those folders and restart the container with the volumes properly set:


    Code
    /srv/dev-disk-by-label-Docker/AppData/Pi-hole/dnsmask.d:/etc/dnsmask.d
    /srv/dev-disk-by-label-Docker/AppData/Pi-hole/pihole:/etc/pihole
  • Your 2nd volume is wrong.


    You're better off stopping the container, deleting those folders and restart the container with the volumes properly set:


    Code
    /srv/dev-disk-by-label-Docker/AppData/Pi-hole/dnsmask.d:/etc/dnsmask.d
    /srv/dev-disk-by-label-Docker/AppData/Pi-hole/pihole:/etc/pihole

    Thank you so much for the response. Are you sure? I see the pihole files in AppData/Pi-hole and I can see the files updated today.




    Here is a screen cap from the tutorial



    Here is my setup.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!