Page 1 of 1

Passwordless shortcut login with auth hash. How to?

Posted: Tue Mar 20, 2012 2:39 pm
by mike.obninsk
Hi people!
I use zoneminder 1.25 and all works fine, but I want shortcut for secure passwordless login.
There is FEATURE - Allows shortcut logins on any page of web interface via passing of 'auth' hash as currently passed to zms. This must be explicitly enabled via AUTH_HASH_LOGINS option.

How can I use it? What would be shortcut URL? Help article says about "auth" option - how to use it?

Thanks from Russia!

Re: Passwordless shortcut login with auth hash. How to?

Posted: Tue Apr 10, 2012 7:53 am
by mike.obninsk
OK! if nobody can help me... I hack file /var/www/includes/functions.php

and change if in function getAuthUser( $auth )

if ( $user['Username']=="demo" && $auth == ZM_AUTH_HASH_SECRET )

And setp up user demo with minimal rights and set up options:

AUTH_TYPE builtin
AUTH_RELAY hashed
AUTH_HASH_SECRET secret_passphrase
AUTH_HASH_IPS No
AUTH_HASH_LOGINS yes

And after that I can autologin with:

/index.php?username=demo&auth=secret_passphrase