Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Don't recommend editing DB to reset passwords.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Aug 17, 2022
1 parent 53421e9 commit 2ce408e
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions docs/usage/administration/admin_faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,7 @@ SELECT NAME from users;
Manually resetting passwords
---
Users can reset their password through their client. Alternatively, a server admin
can reset a user's password using the [admin API](../../admin_api/user_admin_api.md#reset-password)
or by directly editing the database as shown below.

First calculate the hash of the new password:

$ ~/synapse/env/bin/hash_password
Password:
Confirm password:
$2a$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Then update the ``users`` table in the database:

UPDATE users SET password_hash='$2a$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
WHERE name='@test:test.com';

can reset a user's password using the [admin API](../../admin_api/user_admin_api.md#reset-password).


I have a problem with my server. Can I just delete my database and start again?
Expand Down

0 comments on commit 2ce408e

Please sign in to comment.