BirdNET-Pi icon indicating copy to clipboard operation
BirdNET-Pi copied to clipboard

Password not working everywhere, but does in some places.

Open MABeatty1978 opened this issue 2 years ago • 3 comments

PLEASE READ THE DOCUMENTATION BEFORE SUBMITTING AN ISSUE

Describe the bug I can click on "Tools" and it gives me a prompt to sign in. I enter my username and password and it takes me into the tools menu. From the tools menu, I can update settings, system controls, services, custom species list, and excluded lists all without a problem. However, if I try to select System Info, File Manager, Database Maintenance, or Web Terminal, it prompts me once again for a username and password and the same password I used to get into tools doesn't let me in. I'm also getting prompted to enter username and password on the spectrogram.

MABeatty1978 avatar Dec 01 '23 02:12 MABeatty1978

Something that stands out, my birdnet.conf does not seem to be connected to anything. I copied the blanked out "default" conf, and BirdNet continued to work just fine. Likewise, if I update the settings for the password or lat/lon, it doesn't update the .conf file. I don't know if that is expected behavior or not, but I think it's worth mentioning.

MABeatty1978 avatar Dec 01 '23 02:12 MABeatty1978

I messed around with this for an hour, and for some unknown reason, it started working fine again. I don't know what I did, if anything, that fixed it. My best guess is that the issue started when I was building a new instance of BirdNetPi on a separate Raspberry Pi and had them both up and running at the same time using the same browser. I turned the new one off about a half hour ago, so I'm wondering if there was some kind of caching issue?

I'll leave this open if anyone is interested in digging in deeper to figure out what happened, but please feel free to close if not.

MABeatty1978 avatar Dec 01 '23 03:12 MABeatty1978

Passwords for different functions are handled in the caddyfile. This makes it possible to set different passwords for different functions.

  1. Run the following command and replace $PWD with the password you want users to gain access to, for example, audio listening with: caddy hash-password --plaintext $PWD Copy the result.
  2. Open /etc/caddy/Caddyfile , find the line that reads "basicauth /stream {" and the line below that reads "birdnet a lot of characters" Replace the characters with the password you got from step 1 and possibly also change the username.
  3. Run the command: sudo systemctl reload caddy

Svardsten53 avatar Jan 18 '24 08:01 Svardsten53