OPT_USE_AUTH Locking Out Users

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

OPT_USE_AUTH Locking Out Users

Post by aj3 »

Hello,
I am running Zoneminder v1.34.22 on a Debian10 Buster machine.
My problem is that when I enable login, I get locked out.

Cameras are working, and everything is good.
I want to force logins in order to access the cameras/Zoneminder.

If I go Options > System > enable OPT_USE_AUTH, I lock out myself.

I then have to go in via ssh, jump over to root user, then:
$mysql -u root -p
use zm;
UPDATE Config set Value=0 where Name='ZM_OPT_USE_AUTH';

Then I have access to the system again.

Where am I going wrong?
This is one of the links that helped me, and here is an askubuntu link that contains some useful info.
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: OPT_USE_AUTH Locking Out Users

Post by aj3 »

Touching base...
Any idea what could be going on?
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: OPT_USE_AUTH Locking Out Users

Post by aj3 »

Hello.
Any idea what could be going on?
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: OPT_USE_AUTH Locking Out Users

Post by burger »

Are you typing the correct password? Did you install correctly? Please post verbose logs.

Follow the guides on https://wiki.zoneminder.com/Debian if you didn't use those to install.

You can change the password after you disable auth. This is covered in the zm wiki. Then re-enable auth, and
it should work.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: OPT_USE_AUTH Locking Out Users

Post by aj3 »

So, some progress.

I grabbed a new PC.
I installed from scratch Debian 10 Buster.
I then followed these instructions to install Zoneminder.

A fresh install of Zoneminder came up.
Three user accounts were tested (admin, user1, and user2).
When I activated Options > System > enable OPT_USE_AUTH, the Zoneminder page asked for login user/password.
I entered the information for all three users, and all three entered perfectly.

So I took my old-Zoneminder install, dumped the database.
Took new-Zoneminder install, dropped the database, and imported the dump from the original Zoneminder install.

All the cameras came up.
Yet no login.
I once again went and actiavted Options > System > enable OPT_USE_AUTH.
As soon as I did that, I once again locked myself out of the web interface.

Now I don't know what the current database contains that is causing that thing to blow-up.

Any thoughts what could be going on?
aj3
Posts: 28
Joined: Fri Aug 30, 2019 5:47 pm

Re: OPT_USE_AUTH Locking Out Users

Post by aj3 »

So I enabled additional logging... and it seems to be the login page isn't sending back to the server the username and password.

I attach the screenshots of what I see.
In the browser, when I am going to login as admin, and put in the password, I hit enter.

The logs show "User: none".
Could this be the issue?
login-page.png
login-page.png (12.38 KiB) Viewed 5836 times
RELEVANT LOGS BELOW

07/26/21 15:00:36.089443 web_php[1805].DBG [10.0.0.105] [Setting cookie parameters to lifetime(3600) path(/) domain () secure() httpOnly(1) name:ZMSESSID] at /usr/share/zoneminder/www/includes/session.php line 20
07/26/21 15:00:36.149736 web_php[1805].DBG [10.0.0.105] [No username in session] at /usr/share/zoneminder/www/includes/auth.php line 258
07/26/21 15:00:36.400485 web_php[1805].DBG [10.0.0.105] [View: login Request: Action: login User: none] at /usr/share/zoneminder/www/index.php line 213
07/26/21 15:00:36.508943 web_php[1805].DBG [10.0.0.105] [Including includes/actions/login.php] at /usr/share/zoneminder/www/index.php line 231
logs.png
logs.png (9.29 KiB) Viewed 5836 times
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: OPT_USE_AUTH Locking Out Users

Post by SteveGilvarry »

Can't see if you have tried resetting the password for the user while Auth is off? Then turning it on and see what happens.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
jas0r
Posts: 2
Joined: Sat Feb 05, 2022 12:23 am

Re: OPT_USE_AUTH Locking Out Users

Post by jas0r »

Hi, did you manage to fix this. I am having the same error on a new install.

I have reset the passwords while auth is off in the options but every time I enable auth with either hash, plain or none I cannot login.

The PHP log keeps saying [View: login Request: Action: login User: none] so its like the username is not being passed through.

I have tried all the options of hash, hash ips and so on but can only access the site with auth off

Any ideas?
Post Reply