1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Merge pull request #1011 from pi-hole/fix/sudoers

Fix: Dynamic instead of static sudoers file
This commit is contained in:
Dan Schaper 2016-12-22 12:20:01 -08:00 committed by GitHub
commit 9355a8ad0e
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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!"
}