Password for pre-configured Pi-Hole

The SSH daemon probably isnt enabled to start at boot so you cant connect from a client yet.
Have a read here about enabling SSH on headless setup:

Thanks for the links.

So the easiest way I found out: create an empty file called "ssh" without an extension and save it to the boot partition of RPi's SD card. Then RPi would boot up, automatically delete the empty file and enable SSH.

But I opened up the pre-assembled PH device, and there is no sd card.

And I'm still flummoxed at how to access into the RPi OS to enable ssh.

Am I missing anything?

j.

EDIT: I'm on a non-admin Mac OS account. Somehow I can't SUDO anything. It doesn't seem my other admin password works.

Thats the way forward.
There should be an SD card slot:

https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up/4

Ohw ps. was an instruction card (with web link) included with the package you purchased ?

Hi dH !

So I spent all night scouring the Web for one simple solution to enable ssh.

The SD card seemed like a good idea, but the pre-assembled PH case appeared to have glued the RPi board bottom to the casing. (It was also a headache to figure out how to open the casing in the first place, as well.)

Just now, I looked through the PH box and there were mostly business cards, which I thought were marketing ads, but yes-- those cards had indicated websites for instructions.

I think I'm going to try my 3rd method of plugging the RPi into my 55 4K HDTV (overkill?) ... plug my iMac keyboard and see if I can do without the mouse.

Can you believe I threw out old electronics for hazardous waste disposal for recycling, months ago?

J.

Hi.. the problem I had was sorted when I realised the preconfigured Pi-hole was of course made by Stake Box.. went to this url https://www.stakebox.org/blogs/learn/getting-started-with-pi-hole-your-network-wide-ad-blocker

There I found it had a different default password

Username adblock

Password blackhole

Sorted mine

Bill

Thanks... I already knew that.

So the 3rd method worked.

I did a little tweaking. I enabled ssh, changed the password and hostname. But I could not find how to change the user password, at least not on the RPi config dialog box.

Now I have a new problem. I can't login PH through FTL. It won't recognize my password.

My PH recognizes the hostname for ssh, but also won't recognize my password.

This is strange, because I had no problem when I connected directly to the RPi box.

EDIT:
Input password 3x into Mac OS X Terminal
After 3rd time: "Permission denied (publickey,password)."

What does that mean?

You don't need root privileges on the Mac to ssh into the Pi. You only need root privileges on the Pi to do things with the Pi once you are logged in to the Pi.

I'm confused on where you are in this process now.

The Pi-Hole password is different than the Pi password. The Pi OS username and password is what you use to remote into the Pi via ssh. The Pi-Hole password is for the web admin GUI page, the one that is set with pihole -a -p.

FTL is the DNS engine of Pi-Hole. Are you referring to the web admin page?

Are you able to connect to the Pi via ssh? Are you able to log into the Pi when you connect a keyboard and monitor?

In nutshell ...

  1. The Linux Bash shell default user account is:

adblock
blackhole

And documented here:


  1. To connect to Pi-hole's Bash shell remotely via SSH, the SSH daemon on the Pi-hole box needs to be enabled first.
    This can be done headless, if have another PC with an SD card reader, or if connect keyboard & video:

  1. Run below command on the Bash shell to set password (or leave blank) for the Pi-hole admin web GUI:

pihole -a -p


  1. Good habit is to change the default password for the shell user "adblock" as well:

sudo passwd adblock

So I almost got it 100% figured out.

I created a new (supposedly root) user.

I'm trying to delete user adblock, but the terminal tells me two things:

  1. Warning: group 'pi' has no more members.
  2. userdel: user adblock is currently used by process 3411

/usr/sbin/deluser: `/usr/sbin/userdel adblock' returned error code 8. Exiting.

...

So am I correct in assuming I cannot delete user adblock?

And so, by adding (supposedly root) user, I thought I could use it to replace adblock.

But apparently not.

I "pihole -a -p"... but...

I thought the whole point was to change the default login/root name (adblock) and its password to increase security.

Now it seems that the web GUI doesn't need a password to log in... and adblock seems to be a permanent fixture.

Am I right?

1 Like

Why would you want to remove the "adblock" shell user ?
Its sufficient to just change password for this shell user to secure your setup.

You dont need to replace the shell user adblock for the root user because both accounts already are present on your setup.
All shell usernames that are known to your distro are stored in below file:

cat /etc/passwd

The root user is a special privileged superuser account as its permitted to do almost anything compared to non privileged accounts like the adblock user.
Its most always the first user created on Linux distro's and the first process spawned "/sbin/init" is started with root user privileges:

pi@noads:~ $ ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.6  28144  6112 ?        Ss   Oct10   0:43 /sbin/init
root         2  0.0  0.0      0     0 ?        S    Oct10   0:01 [kthreadd]
root         4  0.0  0.0      0     0 ?        I<   Oct10   0:00 [kworker/0:0H]
[..]

The web GUI password "pihole -a -p" is not linked in any way to the shell users.
If want to become the root user, login with the adblock user and run below one:

sudo su -

Can you try set password again with below one and share the output ?

pihole -a -p

Only when you leave the password field blank, the web GUI wont ask for a password.

And take into account that if you break something irreversible, you probably need return the box to Pi-Supply to get it fixed because you told us you cant access the SD card for re-imaging etc.

1 Like

I'm wondering about the SD card access, the Pi Supply shows a standard Pi and SD card setup.

Includes Pi-Hole 16GB SD card

The photos don't help a lot, can't see the SD end clearly but it sure looks like you could at least pop the lid, tilt the Pi and swap the card.

1 Like

That's certainly a click-together case. The top likely snaps up and off, and then the Pi may be held on either side tabs or plastic pins/legs through the four holes in the Pi circuit board.

1 Like

Got it, dH!

Thanks for everything! :+1:

1 Like

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