martinpihrt / OSPy

A highly cusomizable DIY timer/controller based on Raspberry Pi
10 stars 5 forks source link

Reset password from code #15

Closed yehuday closed 3 months ago

yehuday commented 3 months ago

For some reason i an unable to login into OSPY even though i definitely use the correct password I still have SSH access and can edit the code so i want to reset my user password instead of reseting the entire OSPY to defaults

Appreciate any tip

yehuda

martinpihrt commented 3 months ago

Currently there is no way to bypass the login and not switch ospy to default (by removing the ospy/data and ospy/backup folders). If you can wait, in the next week I'll write a script run over SSH that deletes the password but leaves the rest. Martin

martinpihrt commented 3 months ago

Hi, The back_door.py file has been added to the OSPy folder, which allows logging into OSPy in case we cannot log in (or do not know the password). We will not lose the settings and log history in OSPy as if we used the default OSPy installation (after deleting the ospy/data and ospy/backup files). The default name and password to run the sudo python3 back_door.py file will be admin/admin.

yehuday commented 3 months ago

Thanks a lot martin ! i ran the script but unfortunately still couldn't login with admin:admin I tried a different browser but still no luck Look like something basic is broken. i might re-install after all