User Tools

Site Tools


Restore Admin Password

If you have lost the admin password, and no other registered GECAMed user has admin rights or is available to log you in, there is a way to restore the original password for admin ('admin') manually.

First you need access to GECAMed's PostgreSQL databank. This is always possible if you can access the server machine. See 'Datarestore' for how to do so. Once you are connected to the database, you browse to the schema 'usermanagement', table 'gecamed_user'. Here you can display the table's data content and also change it.

For security reasons passwords are not entered literally in the database, but are encoded through a hash function. You therefore have to find the hash code of the original admin password. It can be found in the installation's initial data loading script under 'gecamed/install/database/data.sql'. Search for the string “System Administrator” to get straight to the right line. Copy the hash code string (without the quotes) from the SQL INSERT command in this line, 6th position in the VALUE clause, right after 'admin', and put it back in the 'passwordhash' attribute value of the 'admin' line in usermanagement.gecamed_user. Save the change.

You now should be able again to connect with user admin, password admin.

Alternatively you can also copy the hash code of a known password from a non-admin user, such as a secretary, to the admin user.

faq/technical/restoring_admin_password.txt · Last modified: 2014/12/18 11:46 (external edit)