Page 1 of 1

"logging in.." page keeps reloading with remote auth

Posted: Wed Jul 27, 2011 11:10 pm
by sabujp
Hi,

Eventually I'm trying to get LDAP authentication to work using remote auth, but for now even with a simple AuthUserFile setup in a .htaccess file in the top level /var/www/html/zm directory, the login page keeps reloading over and over again after I login in the Apache authentication window. I've tried setting it to use remote auth with both plain and hashed AUTH_RELAY, but I get the same result where it says "Logging in.." and that page keeps reloading itself. I've also tried setting the user in the zm database to have no password and removing the user completely but same results there.

Using 1.24.4, here's my .htaccess file under /var/www/html/zm :

Code: Select all

AuthName 'ZM, enter your login and password'
AuthType Basic
AuthUserFile /home/me/htpasswd
Require valid-user
Here's my /etc/httpd/conf.d/zm.conf :

Code: Select all

<Directory "/var/www/html/zm">
        Options FollowSymLinks
        AllowOverride All
</Directory>

<Directory "/var/www/html/zm/cgi-bin">
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        SetHandler cgi-script
        AllowOverride All
</Directory>
If I set it to remote, but don't have a .htaccess file it takes me to the regular login page and I can login. Everything else works, I can monitor cameras, etc so the setup is good as long as I don't use remote login with a .htaccess file that asks me to supply a login and password. Note, I can use a .htaccess file with LDAP or AuthUserFile authentication with ZM set to do internal auth, but that defeats the purpose of remote auth since the user is then asked to login again using internal auth.

Using CENTOS 6.

Any Ideas?

Thanks,
Sabuj

Re: "logging in.." page keeps reloading with remote auth

Posted: Sun Aug 21, 2011 10:44 am
by MJN
Hi Sabuj,

Did you have any joy with this? I've got exactly the same problem.

I've been running a setup like this on v1.22.3 for years now without issue (although hashed AUTH_RELAY didn't work back then but I don't see that as an issue with my HTTPS setup) and so I'm a little disappointed that my new v1.24.2 setup from the repositories on a fresh Debian Squeeze install seems to be throwing so many hurdles in my way!

I'll keep at it... but I'm not sure how long I can keep pulling my hair out for before I may have to start looking elsewhere! :cry:

Mathew

Re: "logging in.." page keeps reloading with remote auth

Posted: Mon Aug 22, 2011 9:15 pm
by MJN
Looks like the code got screwed somewhere along the way between releases. To fix it, find the following section in index.php:

Code: Select all

require_once( 'includes/actions.php' );

foreach ( getSkinIncludes( 'skin.php' ) as $includeFile )
    require_once $includeFile;
And move require_once( 'includes/actions.php' ); from before the foreach [...] section to after it such that it reads:

Code: Select all

foreach ( getSkinIncludes( 'skin.php' ) as $includeFile )
    require_once $includeFile;

require_once( 'includes/actions.php' );
This will stop the infinite loop that would otherwise never complete.

Note that you must set AUTH_RELAY to None (has that ever worked with AUTH_TYPE set to Remote? I seem to recall a similar problem a few years ago)

One problem down, several more to go... but I'm determined to persevere! I must say, this is without doubt the most painful install of a repository-sourced package I have ever done. I'm tempted to go back to compiling from source just for an easy life! :wink:

Cheers,

Mathew

Re: "logging in.." page keeps reloading with remote auth

Posted: Sat Sep 17, 2011 2:40 am
by kp4djt
This works until you enter the wrong login or password then it sets there a few seconds then starts recycling like it did prior to the correction in the index.php code. It does work as long as I give it the right login/pwd.
The only way to recover is to shut down the browser and restart it.

Re: "logging in.." page keeps reloading with remote auth

Posted: Thu Oct 27, 2011 7:54 pm
by sabujp
I gave up on this and just setup ldap auth.

Re: "logging in.." page keeps reloading with remote auth

Posted: Sun Nov 06, 2011 11:57 pm
by TucsonDirect
Go to phpMyAdmin and Repair all of your tables for zoneminder, this problem will then go away,

You must have shut the system down improperly or list power witch corrupted the database.... If it still wont let you login you will have to go to the users table and (re)create a password for said user account....