AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.16k stars 180 forks source link

login and password for portal doesnt work #237

Closed martinmagnan closed 2 years ago

martinmagnan commented 4 years ago

Hi ! I have a fresh raspbian install + fresh allsky and portal install and Pi3 but default login and password does not work when accessing allsky.local or localhost or ipnumber.

Thank you

guineapigsoup2 commented 4 years ago

I have same issue, reloaded raspberry Pi 4 with vastest distribution, downloaded Allsky from GitHub (vastest version). configured to use RPiHQ camera, camera works fine using CLI. ran GUI/install.sh to load portal, again all loaded ok, but unable to login using admin/secret as user name and password. able to use .../public.php page to review current image.

cplonski commented 4 years ago

Same issue here. I ended up copying the missing raspap.php and raspap.auth files in /etc/raspap/ from a working unit to this one and it fixed it.

jkoenig72 commented 4 years ago

raspap.php:

<?php

$config = array(
  'admin_user' => 'admin',
  'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i'
);

if(file_exists(RASPI_CONFIG.'/raspap.auth')) {
    if ( $auth_details = fopen(RASPI_CONFIG.'/raspap.auth', 'r') ) {
      $config['admin_user'] = trim(fgets($auth_details));
      $config['admin_pass'] = trim(fgets($auth_details));
      fclose($auth_details);
    }
}
?>
DarKOrange75 commented 4 years ago

Same issue, what's wrong with the installation? @thomasjacquin can you please look into this?

guineapigsoup2 commented 4 years ago

<?php

$config = array( 'admin_user' => 'admin', 'admin_pass' => '$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i' );

if(file_exists(RASPI_CONFIG.'/raspap.auth')) { if ( $auth_details = fopen(RASPI_CONFIG.'/raspap.auth', 'r') ) { $config['admin_user'] = trim(fgets($auth_details)); $config['admin_pass'] = trim(fgets($auth_details)); fclose($auth_details); } } ?>

included this file but still no authorisation

jkoenig72 commented 4 years ago

create the file as mentioned above, make sue you set right user - look at the other files in that dir. Should work.

DarKOrange75 commented 4 years ago

Ok thanks, but something has changed in the GUI setup process it is a bug that should be fixed. This was working previously.

guineapigsoup2 commented 4 years ago

changed ownership of raspap.php to www-data and permissions to 644, same as other files in /etc/raspap. also created a null file raspap.auth both of these Changes still fail to allow me to authenticate.

maphilli14 commented 4 years ago

Other than a me too, I can't find much on changing / setting this password with searches.

jkoenig72 commented 4 years ago

Thats what I did. I did not create raspap.auth. Works for me.

DId you stop / start?

On Mon, 24 Aug 2020 at 15:32, guineapigsoup2 notifications@github.com wrote:

changed ownership of raspap.php to www-data and permissions to 644, same as other files in /etc/raspap. also created a null file raspap.auth both of these Changes still fail to allow me to authenticate.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thomasjacquin/allsky/issues/237#issuecomment-679128075, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKKCKVYTCESEWRIGPTCQS3SCJTV7ANCNFSM4QH3YLJQ .

jkoenig72 commented 4 years ago

https://github.com/linuxkidd/allsky-portal/blob/master/raspap.php Thats the file as it has been removed - guess by mistake.

On Mon, 24 Aug 2020 at 15:32, guineapigsoup2 notifications@github.com wrote:

changed ownership of raspap.php to www-data and permissions to 644, same as other files in /etc/raspap. also created a null file raspap.auth both of these Changes still fail to allow me to authenticate.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thomasjacquin/allsky/issues/237#issuecomment-679128075, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKKCKVYTCESEWRIGPTCQS3SCJTV7ANCNFSM4QH3YLJQ .

maphilli14 commented 4 years ago

That fixed it, yes!

martinmagnan commented 4 years ago

Thank you for your help. Creating the above mentionned raspap.php file in etc/raspap solved the problem

DarKOrange75 commented 4 years ago

@martinmagnan Why closing this? The bug in the setup script has not been fixed yet and everyone is going to face the same issue.

martinmagnan commented 4 years ago

Sorry

first time here on github, I tought it had to be closed since there is a solution.

guineapigsoup2 commented 4 years ago

file posted fixed the problem eventually, once I had worked out that password in the file is a hash of the default password secret.

Respi84 commented 4 years ago

Hey, New to everything! I tryed to create the missing file but there was en error that I don't have de permission to create A file in that folder and I can't change the folder settings to "everyone"! can someone help?

thomasjacquin commented 4 years ago

The file was deleted by accident. It re-added it last night. Things should work properly now. Running sudo gui/install.sh should re-build the GUI and bring the new file along.

DarKOrange75 commented 4 years ago

Thank you @thomasjacquin

martinmagnan commented 4 years ago

Thank you !!

EricClaeys commented 2 years ago

Problem resolved so closing this issue.