Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Retrieve username and password #259

Closed
zeppelie opened this issue Sep 30, 2017 · 4 comments
Closed

Retrieve username and password #259

zeppelie opened this issue Sep 30, 2017 · 4 comments

Comments

@zeppelie
Copy link

How can I retrieve my username and password that I lost???

@rvolz
Copy link
Owner

rvolz commented Sep 30, 2017

If there is still an admin user that on could look up all existing user names and issue a new password.

@zeppelie
Copy link
Author

it's lost too... :'(

@rvolz
Copy link
Owner

rvolz commented Sep 30, 2017

If you know some basic SQL you could follow the procedure below. If not, you could delete data.db and start fresh with admin/admin, the rest of the data would be lost then, of course.

Get new password php -r 'print_r(password_hash("new password", PASSWORD_BCRYPT));'
That will print something like "$2y$10$etGuvM9MfxpWrpcbUu3A4eD/QpZVz49nuAz.gTeZvVJIGhYg227ja%". The password is everything except the final "%".

Get the existing usernames from data.db: select username from user;

Update password: update user set password="..." where username="...";

After that you should be able to log in again.

@zeppelie
Copy link
Author

zeppelie commented Sep 30, 2017

thank you very much!it worked!!

@rvolz rvolz closed this as completed Oct 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants