How can an Admin Change a User's Password?

@dkayiwa Sorry I dont understand… So how should I “turn-off” the automatically overwritten feature? Or what should I do next? I’m currently blocked and do not know how to develop further… :disappointed_relieved:

@whitehsu, a few points:

  1. You should not be looking at the legacy UI here (but that’s what you have included in your screenshot). Instead you want to get the reference application, i.e. the thing that looks visually like what you see on
  2. You should not be editing code underneath openmrs/webapp/src/main/webapp/WEB-INF/view/module/… Files are copied here when you deploy an OpenMRS module, but that is not the location of the source code. Instead, you should read about using the OpenMRS SDK to set up and run a server that is running the Reference Application distribution.
  3. The codebase that you need to check out is openmrs-module-adminui. That’s where you need to add the button, and add a new page.

Good luck!

@darius @dkayiwa

Thanks for your kind reply. I’ve tried to set up new environment as your guidance. Therefore, I’ve followed the instruction among the following webpage to set up OpenMRS SDK:

However, I’ve always encountered the database connection issue, even though I’m very sure my input user/password of the database should be correct:

May you kindly help me check what’s wrong with my setup? Here’re my steps to build SDK:

  1. Firstly, after running the mvn setup command, I ran the command “mvn openmrs-sdk:setup” to create server:

    And here’s my input user/password for this server4:

  2. The server seems created successfully:

  3. Launch my local MySQL server, we can find the new created “server4”, which should also mean the user/password of database is workable, or this “server4” table wont be created:

  4. Next, to run the command “mvn openmrs-sdk:create-project” to create project and select option 1: Platform Module:

  5. Then going into the project directory and run the command “mvn clean install openmrs-sdk:run”:

  6. Select server4 and wait until seeing the message “INFO: Starting ProtocolHandler [“http-bio-8080”]”:

  7. And I launch browser to visit the URL http://localhost:8080/openmrs/ but get the error message as below:

  8. Here’s the error logs exported from console: Error Logs.txt (17.9 KB)

I’ve tried for many times with different setup options, but this issue always exists. I’ve tried to use other MySQL users but still encounter the same failure. May you kindly suggest how I should do to resolve this? Any advice will be very appreciated. Thank you very much.

1 Like

@whitehsu this was reported and is now fixed. It happened on MySQL versions from 5.7 and above. So can you try again using the latest SDK and platform release?

@dkayiwa Oh, I got it!! Thanks for information. I’ll try this again on these days. :slight_smile:

@dkayiwa I’ve tried this again but encountered this issue still. I guess I need to remove the older version of OpenMRS firstly and re-setup again. However, after studying the materials of OpenMRS SDK (, I cannot find any document to mention how to “cleanly” remove all files of OpenMRS, may you kindly help guide me this? Thank you very much.

Deleting the runtime properties file and dropping the database should be all.

1 Like

Thanks for reply. But after referring this guide, I find there’s not “” file on my machine. So I can only remove the “openmrs” folder and re-setup SDK again.

However, after following the guide on, I still encounter DB Connection issue:

And on the console, I can find the error message “Unable to find properties file: C:\Users\I312780\openmrs\MyServer01\”:

The server log output also mentions this issue:

I go to the directory mentioned and find there’s not this runtime file really:

Then I guess this the root cause of the DB Connection issue? Because I just follow all steps in the SDK guide, I don’t know what’s action missed. May you help feedback and suggest? Or if I should provide any other information for troubleshooting? Thank you very much.

P.S. My machine is Windows 10. Not sure if this platform may cause problem?

This means that the user name and password you are providing for a mysql database connection are not correct. Try connecting to MySQL using command line tools or any MySQL GUI to confirm your user name and password combination.

Hi I am currently working on this project and I’m still trying to understand what exact requirements are

so in the reference application I get a login screen like this

in the application I got when I build from the source code I get a login screen like this

I am guessing I have to add the new feature to the reference application not the 2nd one but they have different behaviors in case of a forgotten password the first one has "can’t login " instead of forgot password and it gives this when clicked

and in the second one clicking the “I forgot my password” leads here

So can anyone please help me, and name the exact feautures you require

Do I have to merge the 2 implementations or do I just have to implement a way to contact the admin from here

or is contacting admin done separately via anther medium and do I just have to implement a way for the admin to reset a users password

The second question is should an admin only be allowed to reset a user’s password only upon users request or should he be allowed to do so when ever he wants ? and how to identify weather a user has requested a password reset if the request is done via another medium ex - mail ?

This is the same problem i encountered last week… with mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper

@irindu, have you read the Acceptance Criteria section of the ticket?

These give a clear description of what you’re supposed to do in this ticket.

(Note that #4 describes creating another followup ticket about improving on the workflow, to allow for self-resetting, with an email address.)

Thank you Mr Darius for the reply, actually I read all of them and came into this open talk from the link below :slight_smile: , I still have a few questions and also the demo is still not working in my country So it is hard for me to understand the requirements without the demo, I’ve downloaded the reference application can you help me reproduce what demo produces with the reference application?

for example can you help me reproduce with the reference application

1 Like
  1. “System Administration”
  2. “Manage Accounts”
  3. click on any of the rows

Thank you very much Mr Darius, This is how it looks right now

isn’t this what you requested in terms of GUI

Yes, this is what we are asking for in

Thank you very much Mr Darius, Hoping to deliver as soon as possible, can you please help me with gaining the background knowledge to implement this, I am new to your code base and the reference PDF contains all the materials but it would be much easier for me if some one who already experienced in the code base can point me where to look specifically. would you Mr Darius or anyone else who was working on this can kindly help me with that ?

1 Like

Now I understand what the user requirements are, Once the users request a password rest I need to implement a way for the Administrator to reset their password and generate a random password and display that in Administrators UI, From the understanding I have so far about the project I have to implement a OpenMRS Reference Application Module with this functionality and more specifically I need to create a module of type openmrs-module-adminui module or do I have to create a module and add it to openmrs-module-adminui, am I on right path, please kindly correct me if I am wrong

You need to add an additional feature to an existing page in the Admin UI module, which is at

The specific page in question is:

And the link you need to add is within this fragment that is included in that page (or maybe nested within another fragment inside this one):

1 Like

Hi @darius, i have started work on this ticket. I understand that i have to add a reset password button to the userDetails/userTabContentPane fragment in the adminui module which i did. Now i want to add a controller action function for the reset password button which i think should go into userDetails.js. Once this resetPassword button is clicked, i need to generate a random password(should this part be done in js or in the backend?). Also i need access to the backend api which will allow me to set the password to the new randomly generated value and also set the “Is Supposed To Change Password” to “Yes”.(can u guide me on how i can achieve this? i see other functions in the same controller using the User scope to do so.)