zms[5287]: ERR [Unable to authenticate user]
zms[5287]: ERR [Unable to authenticate user]
Building zm-1.20.0 on an SuSE 9.2 without probs, but i am not able to see
streaming video.
/var/log/messages shows
kernel: pwc Using alternate setting 1.
kernel: pwc set_video_mode(320x240 @ 10, palette 15).
kernel: pwc decode_size = 3.
kernel: pwc Using alternate setting 3.
zmc_d0[5258]: INF [Starting Capture]
zms[5287]: ERR [Unable to authenticate user]
zmc_d0[5258]: INF [ToUCam: 1000 - Capturing at 9.90 fps]
any suggestions ?
rmo
streaming video.
/var/log/messages shows
kernel: pwc Using alternate setting 1.
kernel: pwc set_video_mode(320x240 @ 10, palette 15).
kernel: pwc decode_size = 3.
kernel: pwc Using alternate setting 3.
zmc_d0[5258]: INF [Starting Capture]
zms[5287]: ERR [Unable to authenticate user]
zmc_d0[5258]: INF [ToUCam: 1000 - Capturing at 9.90 fps]
any suggestions ?
rmo
Last edited by rmo on Sat Jan 22, 2005 8:07 am, edited 1 time in total.
-
- Posts: 74
- Joined: Wed Feb 25, 2004 5:06 pm
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I am also having the same problems posted above.
1. Can't view stream, and errror :
zms[5287]: ERR [Unable to authenticate user]
2. Can't log in if authentication is turned on.
Without authentication I configured a monitor and it is capturing events but I cannot view them either.
This is with a fresh install, dropped the old database.
Ross
1. Can't view stream, and errror :
zms[5287]: ERR [Unable to authenticate user]
2. Can't log in if authentication is turned on.
Without authentication I configured a monitor and it is capturing events but I cannot view them either.
This is with a fresh install, dropped the old database.
Ross
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
If anyone wants to have a play to help debug this then edit zm_user.cpp and change
to
at around line 205.
This should output some extra debug including the key string and the md5 string. The source of your stream window _should_ contain the same md5 string. The key string should be a concatenation of a secret (may be empty), username, password hash, remote IP, hour, day of month, month and year. If anything doesn't look right then let me know. You may want to change sensitive details before you post.
Phil
Code: Select all
auth_md5[0] = '\0';
Code: Select all
auth_md5[0] = '\0';
Info(( "%s -> %s", auth_key, auth_md5 ));
This should output some extra debug including the key string and the md5 string. The source of your stream window _should_ contain the same md5 string. The key string should be a concatenation of a secret (may be empty), username, password hash, remote IP, hour, day of month, month and year. If anything doesn't look right then let me know. You may want to change sensitive details before you post.
Phil
Hi Phil,
I made the change to zm_user.cpp and rebuilt and installed.
I am not seeing anything that looks like an md5sum in the source of the stream window or the stream frame.
I got the "Unable to authenticate user" error once only on the first attempt to view a stream, and not since. However still unable to view streams.
Should I also see the md5sum string in syslog messages now? I have not seen any there either.
Ross
I made the change to zm_user.cpp and rebuilt and installed.
I am not seeing anything that looks like an md5sum in the source of the stream window or the stream frame.
I got the "Unable to authenticate user" error once only on the first attempt to view a stream, and not since. However still unable to view streams.
Should I also see the md5sum string in syslog messages now? I have not seen any there either.
Ross
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I have tried both set to hashed and plain, with and without an entry in the secret field. Seems to make no difference.
I found I had the path to nph-zms wrong so now I at least have the "Unable to authenticate user" error back.
But still nothing that looks like an md5sum in the page source or the log files. Maybe I am looking in the wrong place.
Ross
I found I had the path to nph-zms wrong so now I at least have the "Unable to authenticate user" error back.
But still nothing that looks like an md5sum in the page source or the log files. Maybe I am looking in the wrong place.
Ross
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Can you tell me what your img source line looks like?
Here's one of mine
The important bit is the 'auth=' part.
Phil
Here's one of mine
Code: Select all
<img src="/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&auth=7af9b7df667cf5ab453d5c967a9ac25e" border="0" width="352" height="288">
Phil
-
- Posts: 74
- Joined: Wed Feb 25, 2004 5:06 pm
Looking at zm_funcs.php, getStreamSrc() doesn't tag on any user ID or 'auth=' entry if ZM_OPT_USE_AUTH is off. Therefore zms.cpp fails auth tests:
I had a bit of a delve...
If I open a monitor using camozola streaming, then the url used is
If I use still images, the IMG is
I've put a few more debug points in zms.cpp and zms_user.cpp (using Error() as Info() doesn't go to my log files - env. variables missing I guess) and what seems to be the problem is this bit of code in main():
username and password contain '\0' (as I'm not authenticating users at the mo) and auth is also '\0' as there's no auth string being passed in.
If I comment out the return(-1) and ValidateAccess() call then I can view the stream.
I had a bit of a delve...
If I open a monitor using camozola streaming, then the url used is
Code: Select all
<param name="url" value="/cgi-bin/zms?mode=jpeg&monitor=7&scale=100&maxfps=15">
Code: Select all
http://camserver.hunter13.lan/cgi-bin/zms?mode=single&monitor=7&scale=100&1106414099412
Code: Select all
User *user = 0;
if ( *username && *password )
{
user = zmLoadUser( username, password );
}
else if ( *auth )
{
user = zmLoadAuthUser( auth );
}
if ( !user )
{
Error(( "main:Unable to authenticate user" ));
return( -1 );
}
If I comment out the return(-1) and ValidateAccess() call then I can view the stream.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 74
- Joined: Wed Feb 25, 2004 5:06 pm
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Odder still, as that part hasn't really changed. What version of php do you have?
The other thing I've found recently on FireFox is that sometimes cookies just get 'stuck' and I can actually have two versions of the same cookie and no matter what the 2nd copy of it is set to FireFox always uses the bogus 1st one. Only once both copies of the cookie (which I thought wasn't possible) are deleted does normal behaviour resume. It's possible you are getting this with the session cookie which might be causing the problem.
Phil
The other thing I've found recently on FireFox is that sometimes cookies just get 'stuck' and I can actually have two versions of the same cookie and no matter what the 2nd copy of it is set to FireFox always uses the bogus 1st one. Only once both copies of the cookie (which I thought wasn't possible) are deleted does normal behaviour resume. It's possible you are getting this with the session cookie which might be causing the problem.
Phil