From 4626b8ced50d17a4cf2da0ee7a4b3bfcb14efa5d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 22 Dec 2016 13:18:38 +0100 Subject: [PATCH 1/2] Removed fixed username from sudoers file --- advanced/pihole.sudo | 1 - 1 file changed, 1 deletion(-) diff --git a/advanced/pihole.sudo b/advanced/pihole.sudo index ef06249a..702bc7a5 100644 --- a/advanced/pihole.sudo +++ b/advanced/pihole.sudo @@ -9,4 +9,3 @@ # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. -www-data ALL=NOPASSWD: /usr/local/bin/pihole From 60054da582b4c7d980944b768cd96ce924ac8356 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 22 Dec 2016 13:26:11 +0100 Subject: [PATCH 2/2] Add lighttpd user (OS dependent) to sudoers file --- automated install/basic-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index b03b98d0..e99a914a 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -801,6 +801,8 @@ installPiholeWeb() { echo -n "::: Installing sudoer file..." mkdir -p /etc/sudoers.d/ 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 chmod 0440 /etc/sudoers.d/pihole echo " done!" }