This is probably a stupid question with an obvious answer, I have just installed pi-hole on a fresh Raspbian Stretch (headless, with ssh). After installing Raspbian, I updated the system, rebooted and logged in again. Then I changed the password of the user pi and installed pi-hole using curl without sudo assuming that the installer would ask for the password when needed. However, I was never asked for the password. The installation succeeded, and the pi-hole directory /etc/pihole was created with root permissions. I have posted the ssh session and the beginning of the installation output below, where the pi-hole installer seems to complain about missing root privileges. How can it possibly install into /etc?
Thanks for any advice,
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 13 18:09:42 2018 from 192.168.188.20
SSH is enabled and the default password for the ‘pi’ user has not been changed.
This is a security risk - please login as the ‘pi’ user and type ‘passwd’ to set a new password.
pi@raspberrypi:~ $ passwd
Changing password for pi.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
pi@raspberrypi:~ $ curl -sSL https://install.pi-hole.net | bash
[✗] Root user check
Script called with non-root privileges
The Pi-hole requires elevated privileges to install and run
Please check the installer for any concerns regarding this requirement
Make sure to download this script from a trusted source
[✓] Sudo utility check
[✓] Root user check