Page 1 of 1
OPT_USE_AUTH Locking Out Users
Posted: Fri Feb 26, 2021 1:53 pm
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.
Re: OPT_USE_AUTH Locking Out Users
Posted: Mon Mar 01, 2021 2:01 pm
by aj3
Touching base...
Any idea what could be going on?
Re: OPT_USE_AUTH Locking Out Users
Posted: Tue Mar 09, 2021 12:35 pm
by aj3
Hello.
Any idea what could be going on?
Re: OPT_USE_AUTH Locking Out Users
Posted: Tue Mar 09, 2021 8:14 pm
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.
Re: OPT_USE_AUTH Locking Out Users
Posted: Mon Jul 26, 2021 6:47 pm
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?
Re: OPT_USE_AUTH Locking Out Users
Posted: Mon Jul 26, 2021 7:04 pm
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 (12.38 KiB) Viewed 6906 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 (9.29 KiB) Viewed 6906 times
Re: OPT_USE_AUTH Locking Out Users
Posted: Wed Jul 28, 2021 1:19 pm
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.
Re: OPT_USE_AUTH Locking Out Users
Posted: Sat Feb 05, 2022 12:27 am
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?