Skip to content

Instantly share code, notes, and snippets.

@bwiens
Last active August 29, 2015 13:57
Show Gist options
  • Save bwiens/9900495 to your computer and use it in GitHub Desktop.
Save bwiens/9900495 to your computer and use it in GitHub Desktop.
[TIP]
=======================
If you need to change a patron or staff account password without using the staff client, here is how you can reset it with SQL.
Connect to your Evergreen database using psql or a similar tool, and retreive and verify your admin username:
[source, sql]
------------------------------------------------------------------------------
psql -U <user-name> -h <hostname> -d <database>
SELECT id, usrname, passwd from actor.usr where usrname = 'admin';
------------------------------------------------------------------------------
If you do not remember the username that you set, search for it in the actor.usr table, and then reset the password.
[source, sql]
------------------------------------------------------------------------------
UPDATE actor.usr SET passwd = <password> WHERE id=<id of row to be updated>;
------------------------------------------------------------------------------
The new password will automatically be hashed.
=======================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment