Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • Autologin

    Posted by Patrick8516 on septiembre 16, 2021 at 11:57

    Hey!

    I want to set up a raspberry pi that automatically logs onto the Webinterface and shows the tactical view.

    That works perfectly fine, but every time the raspberry restarts i have to sign in again.

    In Documentation I found that its possible to auto login via a hash password.

    What I’ve done:

    1) Setup a Autologin (hash) Password in settings

    2) Setup a user named autologin (same password as above)

    3) got a mb5 hash out of: “usernamepassword”

    I tried to put that into my Link:

    // mb5sum = the mb5hash i got out of 3)

    http://localhost/pandora_console/index.php?loginhash_data=mb5sum&loginhash_user=autologin&loginhash=1&sec2=operation/agentes/tactical

    Sadly doesnt work.

    Had a look at /extras/sample_login.php

    Sourcecode suggests creating a html submit button to make it work. Tried that:

           
           
           

    Button works great in forwording me to the website – but a password and username is still required to be entered.

    I feel like i’ve tried everything I could.

    If anyone can help me I would be so glad.

    Joeann replied 2 years, 11 months ago 3 Members · 2 Replies
  • 2 Replies
  • vic

    Administrator
    septiembre 23, 2021 at 18:58
    1542 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hey!

    I want to set up a raspberry pi that automatically logs onto the Webinterface and shows the tactical view.

    That works perfectly fine, but every time the raspberry restarts i have to sign in again.

    In Documentation I found that its possible to auto login via a hash password.

    What I’ve done:

    1) Setup a Autologin (hash) Password in settings

    2) Setup a user named autologin (same password as above)

    3) got a mb5 hash out of: “usernamepassword”

    I tried to put that into my Link:

    // mb5sum = the mb5hash i got out of 3)

    http://localhost/pandora_console/index.php?loginhash_data=mb5sum&loginhash_user=autologin&loginhash=1&sec2=operation/agentes/tactical

    Sadly doesnt work.

    Had a look at /extras/sample_login.php

    Sourcecode suggests creating a html submit button to make it work. Tried that:

           
           
           

    Button works great in forwording me to the website – but a password and username is still required to be entered.

    I feel like i’ve tried everything I could.

    If anyone can help me I would be so glad.

    Hi Patrick8516,

    We have carried out tests and we have no problems logging in without having to enter the credentials.

    1º Check that the “Automatic login (hash) password” parameter in your console is the same as the one configured in the script. In the menu “Setup –> Setup –> General Setup”.

    2º Remember that you only have to change the credentials and the IP of the script:
    /var/www/html/pandora_console/extras/sample_login.php

    <?php
    // Static password, set at both ends
    $pwd = 'XXXXXXXXXX';
    $user = 'YYYYYYYYYY';
    $data = $user.$pwd;
    $data = md5($data);
    
    echo "DEBUG md5sum $data user $user Pass $pwd
    "; echo ''; echo ''; echo ''; echo ''; echo '';

    http://ZZZZZZZZZ/pandora_console/extras/sample_login.php

    When you run the script you should only see the button with the parameters you entered. When you click it you should be logged in instantly.

    In case you are asked for credentials, check the execution in another browser.

    Best regards,
    Víc.