Skip to content

Reset Password

James G edited this page May 7, 2020 · 11 revisions

Mysql Client direct DB intervention

Change password for a user

ChurchCRM currently uses SHA256 hash of the plaintext password salted with the ID of the user record. Securing the method of password hashing is discussed in https://github.com/ChurchCRM/CRM/issues/2342

UPDATE `user_usr` SET 
    `usr_Password` = SHA2(CONCAT("SECRET_PASSWORD", usr_per_ID),256)
  , `usr_NeedPasswordChange` = 0 
WHERE usr_per_ID = 1 
  AND usr_UserName = 'Admin';

This SQL statement needs to be executed in a tool such as phpMyAdmin in the same database configured for ChurchCRM. Alternatively, if you have command line access to your database, log into the ChurchCRM database using the mysql command line tool, eg mysql --user=ccrmDBusername --password=ccrmDBpassword ccrmDB.

Reset the admin user to installation default

The following SQL is a simplified version of the task done during installation to set the deafult password for the admin user. As above, it needs to be executed in phpMyAdmin/mysql against the ChurchCRM database.

UPDATE user_usr SET
    usr_Password='4bdf3fba58c956fc3991a1fde84929223f968e2853de596e49ae80a91499609b',
    usr_NeedPasswordChange=1
WHERE usr_per_ID=1;

You can now log into the ChurchCRM web interface as admin with the default password and will be prompted to change the password on login.

Clone this wiki locally