Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Can't login with initial user

I’ve successfully installed OpenEMR 6.0.0 following the instructions on the site with no errors.

I’ve noted aside the initial username and password. But I’m getting invalid username or password when trying to login. The apache log gives no errors. What could it be?

hi @Filipe_Aguiar, do you have access to the database? could query the log table

eek, it’s all encrypted, if you can get to an sql prompt can reset with

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

I have access to the database, yes.

My username is administrador and I ran the query you’ve passed. Since you didn’t say what password it would reset to I tried the combination of administrador/pass, administrador/password, administrador/admin and the problem persists.

that query would update a username of admin and best to keep the hashed password which equates to pass so adjust the username accordingly so guessing

UPDATE users_secure SET `password` = '$2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4Wy3PBdEufNu' WHERE `username` = 'administrador'

Yeah. I’ve changed the username in the query accordingly. In fact I verified and the current password hash is set to $2a$05$MKtnxYsfFPlb2mOW7Qzq2Oz61S26s5E80Yd60lKdX4Wy3PBdEufNu. And yet I can’t login.

Check out the log table in openemr database (the comments column will store where the login broke down). Encryption of this field is not turned on by default in 6.0.0, but if the fields are encrypted, let us know, since there is then a simple global that can be changed in database to disable that.

ack, even though it’s not encrypted, the comments column will be base64 encoded making this tougher to look through. could find the login entry (in event column) and then copy the comments into a base64 decoder to see the message (as an aside, it is base64 encoded to deal with binary data on query logging).

The decrypted text is as follows:
failure: user not in any phpGACL groups


looks like this type of bug may be cropping up again:
MySQL 8 broken - Not able to login after installation · Issue #2870 · openemr/openemr · GitHub

you can get your instance working with a:

INSERT INTO `gacl_groups_aro_map` (`group_id`, `aro_id`) VALUES ('11', '10');

Are you using mysql or mariadb? which version?

I’ve seen this before when the Gacl silently fails on an upgrade. Not sure on install but usually running sql_upgrade fixed for me.

It didn’t work for me unfortunately. I had to reinstall it. Now it’s working. I’ll mark this as a solution, but if you guys could improve it I think it would be great.


Sometimes the gacl will fail and we may not notice the error being displayed. Happened to me several times. However, we’ll certainly keep an eye open for future.
Be safe…