Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   reset admin password (http://www.mirthcorp.com/community/forums/showthread.php?t=3191)

jaw 11-08-2009 12:06 PM

reset admin password
Hey, I'm taking over a development environment that someone else (now sacked) has left.
But he changed the default admin/admin login credentials.

So question is how I reset these,, I have DB access of course..

What algorithm is used? So I can generate a new password...

Or how do I reset it with some other tool?

jacobb 11-08-2009 02:29 PM

You can look at the default insert statement done in the *-database.sql files included with Mirth Connect for each database. Using the value inserted there, you could reset it back to admin, then use the Mirth Connect Administrator to change it to something more secure.

mdisano 11-10-2010 10:21 AM

admin password reset
This does not work...I have tried entering in the string from the derby.database.sql file and after completion and mirth restart I still can't login. Here is what I ran to change reset the password to "admin"

java -cp derbytools.jar:derby.jar org.apache.derby.tools.ij
ij version 10.2
ij> connect 'jdbc:derby:/apps/Mirth/mirthdb';
1 row inserted/updated/deleted
ij> exit;

empee 05-19-2013 05:13 AM

Reset Mirth admin user password in latest Mirth Server on Windows
1. Stop Mirth server
2. cd to C:\Program Files\Mirth Connect\lib
3. C:\Program Files\Mirth Connect\lib>java -cp derbytools-;derby- org.apache.derby.tools.ij
4. connect 'jdbc:derby:C:/Program Files/Mirth Connect/Mirthdb';
5. select * from person; -- find ID of Admin user, usually it will be 1
6. update person_password set password='SALT_Np+FZYzu4M0=NdgB6ojoGb/uFa5amMEyBNG16mE=' WHERE person_id=1

These steps worked for me..

amith 10-10-2013 02:37 AM

reset mirth password for LINUX
Update: this is slightly different for Linux users but makes all the difference

1)cd /opt/mirthconnect/lib

2)sudo java -cp /opt/mirthconnect/lib/derbytools- org.apache.derby.tools.ij
2-1)[sudo] password for xxxxx: [Enter SUDO password] ******

3)connect 'jdbc:derby:/opt/mirthconnect/mirthdb/';

4)select * from person;

5)update person_password set password='SALT_Np+FZYzu4M0=NdgB6ojoGb/uFa5amMEyBNG16mE=' WHERE person_id=1;

6)select * from person_password;

rdejournett 07-05-2018 05:56 AM

Short update on this, this command will work. Few issues with newer versions, and basically the paths and files need to be changed to suit your install.

1) You must be in a administrator cmd prompt. cd to C:\Program Files\Mirth Connect\server-lib\database

2) run this: java -cp derbytools-;derby- org.apache.derby.tools.ij

3) SHUT DOWN MIRTH SERVICE - this disconnects the DB.

4) connect 'jdbc:derby:C:\Program Files\Mirth Connect\appdata\mirthdb';
5) select id, username from person; -- note person_id - should be 1
6) select password from person_password where person_id=1; -- shows previous password, write this down.
7) update person_password set password='SALT_Np+FZYzu4M0=NdgB6ojoGb/uFa5amMEyBNG16mE=' WHERE person_id=1;
8) quit;
9) Start Mirth.

If you are having issues with read only db, it's because the command prompt is not elevated. If you are having issues starting mirth, it's bc you have the db open already (you did not quit;).

Scott Adair 09-10-2018 08:08 PM

Trying to reset password on 3.5
I have a Mirth instance that appears to have just lost its users - we had 3 user accounts on it last week, and now we have only admin. The admin password, however, was apparently not admin, so I'm currently trying to reset it. I've read through 6 threads now and tried both of the hashes that are commonly listed, but I'm still not able to login. The steps I've tried:
1) cd "C:\Program Files\Mirth Connect\server-lib\database"
2) java -cp derbytools-;derby- org.apache.derby.tools.ij
3) Stop Mirth Service
4) connect 'jdbc:derby:C:/Program Files/Mirth Connect/appdata/Mirthdb';
5a) Old Hash:
update person_password set password = 'YzKZIAnbQ5m+3llggrZvNtf5fg69yX7pAplfYg0Dngn/fESH93OktQ==' where person_id = 1;
5b) New Hash:
update person_password set password='SALT_Np+FZYzu4M0=NdgB6ojoGb/uFa5amMEyBNG16mE=' WHERE person_id=1;
6) Start Mirth Service, login as admin/admin

I've verified each time that person_password was updated, and person_id = 1 is definitely admin. I don't see any encryption or digest settings in mirth.properties. Thoughts? Is there a new hash for 3.5, perhaps? Did I miss a key step or attribute?

Edit: I realized that the database was set to use postgres. I opened psql, found all of our users in the person table, and updated my password with the old hash, worked beautifully. I didn't even have to restart Mirth. Just an FYI for anyone using postgres instead of the default derby database. To echo narupley, make sure you're using the database you think you are using.

ezinteropsolutions 07-30-2019 09:11 AM

What encryption are we using for the password here?

iamonkara 01-05-2020 02:28 PM

What encryption is used to store password in PostgreSQL ?

Originally Posted by ezinteropsolutions (Post 267249)
What encryption are we using for the password here?

I would like to know the answer to this question too. Anyone ?

narupley 01-06-2020 06:12 AM


Originally Posted by iamonkara (Post 271345)
I would like to know the answer to this question too. Anyone ?

The default digest algorithm used for hashed passwords is SHA-256, but can be changed with the "digest.algorithm" setting in mirth.properties. A random 8-byte salt is also used in the hash and stored alongside the password in the database.

All times are GMT -8. The time now is 07:05 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation