I was looking at [RA-660] - OpenMRS Issues and I discovered
that the admin account on the demo server is set to have default locale of
Spanish. Further, when I try to change this to English through the UI I get
an error:
The UI at http://demo.openmrs.org/openmrs/options.form is too confusing for me to try to troubleshoot effectively. I’m on the “Defaults” tab and try to change the local but when I submit/save, I get an “Incorrect password.” error on the “Change Login Info” tab.
I also find it hopelessly confusing. (Can’t wait for the new adminui page
to replace this!)
But what I ran into was that you cannot change the default for the admin
user through the UI (even if you put in all the passwords), and the
underlying get the error (inside a stack trace or something) is “admin user
account is locked”.
Are there any other ways this might have been changed? Does anyone remember
changing it themself?
That message is most likely due to adding this to our db to prevent people from changing the admin password.
DELIMITER ;;
CREATE TRIGGER users_update BEFORE UPDATE ON users FOR EACH ROW
IF OLD.user_id = 1 THEN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'admin user account is locked';
END IF;;
CREATE TRIGGER users_delete BEFORE DELETE ON users FOR EACH ROW
IF OLD.user_id = 1 THEN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'admin user account is locked';
END IF;;
DELIMITER ;
Perhaps we need a few more to prevent further changes?