From afabf30ec6c663c80daeebe4954f7f2b7b4c982d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 23 Dec 2016 16:57:51 +0100 Subject: [PATCH 1/2] Fix Fedora web UI support --- automated install/basic-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 7e4f62ef..bb1704dc 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -809,6 +809,13 @@ installPiholeWeb() { cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole # Add lighttpd user (OS dependent) to sudoers file echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole + + if [[ LIGHTTPD_USER == "lighttpd" ]]; then + # Allow executing pihole via sudo with Fedora + # Usually /usr/local/bin is not permitted as directory for sudoable programms + echo "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" >> /etc/sudoers.d/pihole + fi + chmod 0440 /etc/sudoers.d/pihole echo " done!" } From aa8e1497a315c5fdd59d7c7c465d62bd9ac9b87b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 23 Dec 2016 17:12:38 +0100 Subject: [PATCH 2/2] Fixed error --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index bb1704dc..5156d733 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -810,7 +810,7 @@ installPiholeWeb() { # Add lighttpd user (OS dependent) to sudoers file echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole - if [[ LIGHTTPD_USER == "lighttpd" ]]; then + if [[ "$LIGHTTPD_USER" == "lighttpd" ]]; then # Allow executing pihole via sudo with Fedora # Usually /usr/local/bin is not permitted as directory for sudoable programms echo "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" >> /etc/sudoers.d/pihole