Installation without password



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,


bernbacher@COMPUTER:~$ ssh pi@
pi@’s password:
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l

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

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


I have just realized that sudo on raspbian does not ask for the password. While I find this peculiar, it has nothing to do with the pi-hole installer. I will check the sudo documentation and try to find out how to turn this behavior off…

Best regards,



Look at the file /etc/sudoers.d/010_pi-nopasswd.
It specifies that the user pi can run all commands without the need for a password. You can safely remove this file.


Thanks a lot! I will do this rightaway.



This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.