How to retrieve forgotten Admin password

Hello,
Please how can a forgotten openemr 5.0.1(7) password be retrieved or reset.
Thanks

An admin password? Are you able to log in with another account or are you completely locked out?

Thanks for your response. I am completely logged out. No other account has been created yet apart from the admin account.

@timothy1,

If you have your db access please execute below command on your OpenEMR database

update users_secure set password = ‘$2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4Wy3PBdEufNu’ , salt = ‘$2a$05$MKtnxYsfFPlb2mOW7Qzq2b$’ where username = ‘admin’;

once this query got executed successfully your password will be the ‘pass’ for the admin user.

2 Likes

How did you install OpenEMR. Are you using xampp?

image

Thanks Nilesh. I will try it out and revert

I recently upgraded new 7.0 but forgot my admin password. I am running an application inside the docker in AWS lightsail. I tried your code, but it does not work. What is ‘salt’. it is not in the database. Thank you!

1 Like

salt is for older versions

UPDATE users_secure SET `password` = '$2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4Wy3PBdEufNu' WHERE `username` = 'admin';
1 Like

Hi, what password will this be?[quote=“stephenwaite, post:8, topic:14362, full:true”]
salt is for older versions

UPDATE users_secure SET `password` = '$2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4Wy3PBdEufNu' WHERE `username` = 'admin';
[/quote]

Hi, what password does this query result in?

pass

As always with any direct updates - make sure you have at least table or record backup to have an option to revert.

28 posts were merged into an existing topic: Locked out of Openemr