Problems with user authentication

Forum for questions and support relating to the 1.28.x releases only.
Locked
philwild
Posts: 8
Joined: Wed Jul 27, 2011 4:23 pm

Problems with user authentication

Post by philwild »

Hi Zoneminder users.

I have a zoneminder configuration that appears to work perfectly when authentication is disabled. As soon as I activate user authentication (built-in) streaming/video playback stops working. I end up with a broken image icon where the stream should be

I am not using the cambozola plugin

I see the following in syslog

May 11 10:47:57 security zms[18636]: ERR [Unable to authenticate user]
May 11 10:47:57 security zms[18636]: INF [Terminating Logger]
May 11 10:47:58 security web_php[18152]: ERR [socket_sendto( /tmp/zm/zms-980916s.sock ) failed: No such file or directory]

If I turn authentication off, all works well and I do not see the above errors.

What might I be doing wrong?

Phil
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Problems with user authentication

Post by bbunge »

Try turning your AUTH_RELAY setting to None.

bb
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Problems with user authentication

Post by asker »

Hi, there are various things that could be happening. The key issue is that authentication failed, so ZMS does not stream.

Some initial things for you to respond to:

1. Which version of ZM and how did you install it? Package or source?
2. Please post the contents of /etc/zm/apache.conf
3. I assume you have configured a ZM user using its web interface and are able to log in successfully with it from the web interface?


For starters, please post your /etc/
philwild wrote:Hi Zoneminder users.

I have a zoneminder configuration that appears to work perfectly when authentication is disabled. As soon as I activate user authentication (built-in) streaming/video playback stops working. I end up with a broken image icon where the stream should be

I am not using the cambozola plugin

I see the following in syslog

May 11 10:47:57 security zms[18636]: ERR [Unable to authenticate user]
May 11 10:47:57 security zms[18636]: INF [Terminating Logger]
May 11 10:47:58 security web_php[18152]: ERR [socket_sendto( /tmp/zm/zms-980916s.sock ) failed: No such file or directory]

If I turn authentication off, all works well and I do not see the above errors.

What might I be doing wrong?

Phil
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
philwild
Posts: 8
Joined: Wed Jul 27, 2011 4:23 pm

Re: Problems with user authentication

Post by philwild »

bbunge wrote:Try turning your AUTH_RELAY setting to None.

bb
Thankyou. This resolved my problem =)
philwild
Posts: 8
Joined: Wed Jul 27, 2011 4:23 pm

Re: Problems with user authentication

Post by philwild »

asker wrote:Hi, there are various things that could be happening. The key issue is that authentication failed, so ZMS does not stream.

Some initial things for you to respond to:

1. Which version of ZM and how did you install it? Package or source?
2. Please post the contents of /etc/zm/apache.conf
3. I assume you have configured a ZM user using its web interface and are able to log in successfully with it from the web interface?


For starters, please post your /etc/
The problem was resolved by disabling AUTH_RELAY. But to answer your questions

I'm using 1.28.1 on Ubuntu 14.04 installed from the ppa archive.

apache.conf in unadulterated from installation.

Yes, zm was configured from the web interface. Everything appears to work fine up until I turn authentication on.

Appreciate your response.
Cheers
Phil
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Problems with user authentication

Post by asker »

No problem.

Bbunge - can you share some insight into what led you to suggest AUTH_RELAY as a problem? What does it do and what problem does it cause?
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Problems with user authentication

Post by bbunge »

It was something that worked for me some time back. Do not remember other than trying another setting when something does not work. Will set up a test machine and see f I can replicate the issue and come up with a reason. This may take me a couple of days due to some family commitments.

bb
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Problems with user authentication

Post by bbunge »

Finally got time to set up a test machine. Was not able to replicate the problem. I just checked "OPT_USE_AUTH" after adding a new admin user. Was able to log in after saving the settings.

I remember changing "AUTH_RELAY" to None when I was trying to get ZM streams to show in a web page that did not require log in. With Hashed checked the streams would not always start.

bb
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Problems with user authentication

Post by knight-of-ni »

Changing AUTH_RELAY to none is a workaround, rather than a fix.
That simply turns off hash generation.

The following can cause the server to generate an incorrect hash:
- The server clock is more than 1 hour off
- The timezone in php.ini is not set at all or incorrectly
- AUTH_HASH_IPS is on, but the server cannot determine the IP of the remote client

Additionally, I am not entirely certain how tolerant the AUTH_HASH_SECRET is of extended ascii characters. If you are having trouble with auth hashing, then set the secret to something basic to verify that is not causing the problem.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked