Invalid username or password

Hello,
I’ve been using Openemr for a year without any issues and suddenly, I can’t login, either as administrator or one of the users. Is there a way of resetting the administrator login details from MySQL users or user-secure? Please what’s the procedure for doing this?
Thanks

hi @Valana , you can change the password in mysql but maybe it’s something else.
Try running

select * from log order by date desc limit 10;

from a mysql command line immediately after a failed login to get some clues as to what’s going on.

Thanks Stephen. I entered the command line but it wasn’t recognized. Also, I got these 2 error messages from the php error log

warning: Undefined array key “authUser” in /home/valanaadmin/public_html/openemr-6.0.0/library/auth.inc on line 76

warning: Undefined array key “authProvider” in /home/valanaadmin/public_html/openemr-6.0.0/library/auth.inc on line 76

Does this help track the problem down?

Hi @Valana , please enter the above command at a mysql command prompt. What OS are you using? Be glad to give some guidance on how to access it.

Our server is Centos. I entered the command the way it’s spelled out after a failed login but the system couldn’t recognize the command.

hi @Valana, it runs ok for me:

MariaDB [openemr]> select * from log order by date desc limit 10;

Hi Stephen, the command finally worked. see what it returned.

sql> select * from log order by date desc limit 10;
±-----±--------------------±-------±---------±-----------------±----------±-----------------------------------------------------------------±-----------±-----------±--------±---------±---------±---------±-------------±------------+
| id | date | event | category | user | groupname | comments | user_notes | patient_id | success | checksum | crt_user | log_from | menu_item_id | ccda_doc_id |
±-----±--------------------±-------±---------±-----------------±----------±-----------------------------------------------------------------±-----------±-----------±--------±---------±---------±---------±-------------±------------+
| 5423 | 2022-01-19 07:38:38 | login | login | valana-admin-2go | Default | ZmFpbHVyZTogNzEuMTgyLjE1My41OS4gdXNlciBwYXNzd29yZCBpcyBleHBpcmVk | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5422 | 2022-01-19 07:38:29 | logout | logout | NULL | NULL | YXV0aENoZWNrU2Vzc2lvbigpIGNoZWNrIGZhaWxlZCwgc28gZm9yY2UgbG9nb3V0 | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5421 | 2022-01-19 07:26:26 | logout | logout | NULL | NULL | YXV0aENoZWNrU2Vzc2lvbigpIGNoZWNrIGZhaWxlZCwgc28gZm9yY2UgbG9nb3V0 | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5420 | 2022-01-18 22:42:17 | logout | logout | NULL | NULL | YXV0aENoZWNrU2Vzc2lvbigpIGNoZWNrIGZhaWxlZCwgc28gZm9yY2UgbG9nb3V0 | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5419 | 2022-01-18 09:13:29 | login | login | valana-admin-2go | Default | ZmFpbHVyZTogNzEuMTgyLjE1My41OS4gdXNlciBwYXNzd29yZCBpbmNvcnJlY3Q= | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5418 | 2022-01-18 09:04:49 | login | login | valana-admin-2go | Default | ZmFpbHVyZTogNzEuMTgyLjE1My41OS4gdXNlciBwYXNzd29yZCBpbmNvcnJlY3Q= | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5417 | 2022-01-18 08:28:29 | login | login | valana-admin-2go | Default | ZmFpbHVyZTogNzEuMTgyLjE1My41OS4gdXNlciBwYXNzd29yZCBpcyBleHBpcmVk | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5416 | 2022-01-18 08:28:09 | logout | logout | NULL | NULL | YXV0aENoZWNrU2Vzc2lvbigpIGNoZWNrIGZhaWxlZCwgc28gZm9yY2UgbG9nb3V0 | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5415 | 2022-01-18 07:38:34 | logout | logout | NULL | NULL | YXV0aENoZWNrU2Vzc2lvbigpIGNoZWNrIGZhaWxlZCwgc28gZm9yY2UgbG9nb3V0 | | NULL | 0 | NULL | | open-emr | NULL | NULL |
| 5414 | 2022-01-17 19:24:12 | login | login | SSC002 | Default | ZmFpbHVyZTogNzUuNy4xMTIuMTU3LiB1c2VyIHBhc3N3b3JkIGlzIGV4cGlyZWQ= | | NULL | 0 | NULL | | open-emr | NULL | NULL |

nice @Valana , after going to https://www.base64decode.org/ and plugging in ZmFpbHVyZTogNzEuMTgyLjE1My41OS4gdXNlciBwYXNzd29yZCBpcyBleHBpcmVk you can see

failure: <ip addr> user password is expired

so run this command at the mariadb prompt to undo the global checking for passwords expiring:

UPDATE `globals` SET `gl_value`='0' WHERE `gl_name` = 'password_expiration_days';
1 Like

Problem solved! Thanks Stephen.

1 Like

Hola Stephen, me pasa lo mismo, lo tengo instalado en Synology DS918+ (OS DSM 7), esto me pasa a mí: ZmFpbHVyZTogMTkyLjE2OC4xLjEyOC4gdXNlciBub3QgZm91bmQ= ¿Puedes ayudarme?
Mil gracias

hi @ralosan , when you decode that it says “no user found” so would make sure you’re trying to login with a valid user name.

Gracias por su pronta respuesta. Sí, pongo el usuario correcto. Este es el registro completo: | 13 2022-03-03 19:03:32 login login H00-admin-77 ZmFpbHVyZTogMTkyLjE2OC4xLjEyOC4gdXNlciBub3QgZm91bm… NULL 0 NULL open-emr NULL NUL

it’s not recognizing that user name

I have lost access to all of my admin account for some reason, when i run the SQL command to check for issues i receive empty username for one account, and user stored pa for the other account. Has anyone had a similar issue?

see if this helps @harmone75 , User can't log on - #5 by stephenwaite