Include username and password in HTML link to zoneminder

Forum for questions and support relating to the 1.24.x releases only.
Locked
nogero
Posts: 14
Joined: Fri Apr 22, 2011 5:32 pm

Include username and password in HTML link to zoneminder

Post by nogero »

When I access ZM from my mobile phone it is a pain to enter my username and password. Is there a method to include username and password in the HTML link? For example some systems (lots of cams) allow http://username:password@domain/.... to bypass login prompts. an I do this for a link to enter ZM?
Running Ubuntu 11.04 64bit Zoneminder 1.24.3 from SVN, FFmpeg, libjpeg-turbo, Webmin, Cambozola
help40
Posts: 14
Joined: Mon Sep 20, 2010 9:46 am

Re: Include username and password in HTML link to zoneminder

Post by help40 »

you want to put this link somewhere on other page ? right?

I use such solution .... copy part of login page , and make fields hidden ...
and I have "button" ...

check it , change your URL , user, pass

Code: Select all

 <form name="loginForm" id="loginForm" method="post" action="http://YOURIP.COM/zm/index.php" target="_blank">
        <input name="action" value="login" type="hidden">
        <input name="view" value="postlogin" type="hidden">
        <table id="loginTable" class="minor" cellspacing="0">
          <tbody>
            <tr>
              <td class="colRight"><input name="username" value="USERHERE" size="12" type="hidden"></td>
            </tr>
            <tr>
              <td class="colRight"><input name="password" value="PASSHERE" size="12" type="hidden"></td>
            </tr>
          </tbody>
        </table>
        <input value="ENTER" type="submit" >
      </form>
this will open main page of zone minder .... hope this helped
unfortunately I do not know (yet) how to make other page work , as example monitor ...
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Include username and password in HTML link to zoneminder

Post by zoneminder »

If you change the ZM authentication method to remote you can then set up a htaccess file to manage authentication for your system. You can then use the user:pass@ format for logging in but it will be global.
Phil
Locked