Read about OpenEMR's Response to the COVID-19 Pandemic at https://www.open-emr.org/covid19/

Incorrect admin password...Help!

Situation
I am locked out of the administrator account.

OpenEMR Version
5.0.1

Browser:
Google Chrome

Operating System
windows server

Logs

I have a rather strange situation with the administrator account, I have reset the password in phpmyadmin using an sql query that I located in a thread of a similar issue. The command is not working on the admin account BUT it worked on another non administrative account that I tested the command on to ensure the command was indeed correct. Can anyone point me in the right direction? The command I used is below, which as I said worked for the non admin account.

update users_secure set password = ‘$2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4Wy3PBdEufNu’ , salt = ‘$2a$05$MKtnxYsfFPlb2mOW7Qzq2b$’ where id = ‘ADMIN USER ID’;

hi @Bernie, did you try without the salt?

Yes, I have also tried without the salt. Is there any particular reason that the sql script would work on other users and not the administrative account? I think that may be the key to unraveling this challenge. I have also manually accessed the users_secure.php file in phpmyadmin and edited the admin user by copying the username and salt from the script above in the corresponding text boxes. This method was successful for a non admin user but the admin account remains largely uncooperative. Any other suggestions?

One other clue I have and hopefully it will shed some light on the situation is when I used the second method and copied the username and salt to the corresponding textboxes in user_secure in phpmyadmin, I realized that although I changed data in both boxes, the results from the query is stating only one row is changed although I changed data in both boxes…Weird…

have you tried
WHERE username = 'admin'
or whatever the username of the admin is?

Yes I have, no luck unfortunately.

was the admin user marked inactive?

That is actually a possibility as I did make an adjustment by removing the calender for the administrator.

Can anyone guide me on reactivating the admin user?

@Bernie

1.Login to MySQL using your credentials
2.Select OpenEMR database to which you want reset user’s password

Get the admin user id from users table using the following query.
3.select id from users where username = ‘ADMIN USER NAME’;
From that admin user id using the following query update the users table.
4.update users set active = 1 where id = ‘ADMIN USER ID’;

Now The administrator will be active and be able to login with the credentials

Thanks,
ViSolve

I received this instruction from @stephenwaite in the telegram group and it worked brilliantly. Thanks guys.