Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost Passwords? #798

Closed
lithium-ap opened this issue Aug 25, 2020 · 4 comments
Closed

Lost Passwords? #798

lithium-ap opened this issue Aug 25, 2020 · 4 comments

Comments

@lithium-ap
Copy link

We've lost our Statping admin password running in docker, is there a way to recover?

@davidak
Copy link

davidak commented Aug 30, 2020

i guess it's saved in the database

@hunterlong hunterlong added this to To do in Server/Backend Sep 16, 2020
@Threnklyn
Copy link

Threnklyn commented Sep 22, 2020

what kind of db do you use?
since the password is saved in the users table you can set it manually.

sqlite3 statping.db
select * from users;
update users set password="$2a$04$dWW2urchVFKum3iD/zYPaO1I5sYp7WiHxkXgDwPgPsmtVT99P5sTG" where id=1;

would replace the current password in a sqlite-db with the password "admin".
Change the id to the id of your user

@l0nax
Copy link
Collaborator

l0nax commented Sep 23, 2020

I'm closing this issue since it seems that it has been resolved.
Feel free to re-open it if the issue still persists.

@l0nax l0nax closed this as completed Sep 23, 2020
Server/Backend automation moved this from To do to Fixed Issue Sep 23, 2020
@adamboutcher
Copy link

adamboutcher commented Feb 1, 2022

what kind of db do you use? since the password is saved in the users table you can set it manually.

sqlite3 statping.db
select * from users;
update users set password="$2a$04$dWW2urchVFKum3iD/zYPaO1I5sYp7WiHxkXgDwPgPsmtVT99P5sTG" where id=1;

would replace the current password in a sqlite-db with the password "admin". Change the id to the id of your user

FYI for anyone googling, for postgres...

su - postgres
psql -u statping_user statping
> select * from users;
> update users set password='$2a$04$dWW2urchVFKum3iD/zYPaO1I5sYp7WiHxkXgDwPgPsmtVT99P5sTG' where id=1;
> ```

Postgres needs single quotes and not double.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Server/Backend
  
Fixed Issue
Development

No branches or pull requests

5 participants