Passwordless shortcut login with auth hash. How to?

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
mike.obninsk
Posts: 2
Joined: Tue Mar 20, 2012 2:26 pm

Passwordless shortcut login with auth hash. How to?

Post 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!
mike.obninsk
Posts: 2
Joined: Tue Mar 20, 2012 2:26 pm

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

Post 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
Post Reply