web stats
reset admin password - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-08-2009, 01:06 PM
jaw jaw is offline
What's HL7?
 
Join Date: Nov 2009
Posts: 1
jaw is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 11-08-2009, 03:29 PM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

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.
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
  #3  
Old 11-10-2010, 11:21 AM
mdisano mdisano is offline
Mirth Newb
 
Join Date: Jan 2008
Location: Rhode Island
Posts: 7
mdisano
Default 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';
ij> INSERT INTO PERSON (USERNAME, PASSWORD, SALT, LOGGED_IN) VALUES('admin', 'NdgB6ojoGB/uFa5amMEyBNG16mE=', 'Np+FZYzu4M0=', 0);
1 row inserted/updated/deleted
ij> exit;
Reply With Quote
  #4  
Old 05-19-2013, 06:13 AM
empee empee is offline
What's HL7?
 
Join Date: Feb 2013
Posts: 2
empee is on a distinguished road
Default 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-10.8.2.2.jar;derby-10.8.2.2.jar 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..
Reply With Quote
  #5  
Old 10-10-2013, 03:37 AM
amith amith is offline
Mirth Newb
 
Join Date: Aug 2010
Location: London, UK
Posts: 7
amith is on a distinguished road
Default 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-10.8.2.2.jar:/opt/mirthconnect/lib/derby-10.8.2.2.jar 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;
Reply With Quote
  #6  
Old 07-05-2018, 06:56 AM
rdejournett rdejournett is offline
OBX.2 Kenobi
 
Join Date: Jan 2013
Posts: 99
rdejournett is on a distinguished road
Default

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-10.10.2.0.jar;derby-10.10.2.0.jar 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.
Reply With Quote
  #7  
Old 09-10-2018, 09:08 PM
Scott Adair Scott Adair is offline
What's HL7?
 
Join Date: Sep 2018
Posts: 3
Scott Adair is on a distinguished road
Default 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-10.10.2.0.jar;derby-10.10.2.0.jar 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.

Last edited by Scott Adair; 09-11-2018 at 08:44 AM.
Reply With Quote
  #8  
Old 07-30-2019, 10:11 AM
ezinteropsolutions ezinteropsolutions is offline
What's HL7?
 
Join Date: Oct 2018
Posts: 3
ezinteropsolutions is on a distinguished road
Default

What encryption are we using for the password here?
Reply With Quote
  #9  
Old 01-05-2020, 03:28 PM
iamonkara iamonkara is offline
Mirth Newb
 
Join Date: Apr 2016
Posts: 6
iamonkara is on a distinguished road
Thumbs down What encryption is used to store password in PostgreSQL ?

Quote:
Originally Posted by ezinteropsolutions View Post
What encryption are we using for the password here?
I would like to know the answer to this question too. Anyone ?
Reply With Quote
  #10  
Old 01-06-2020, 07:12 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by iamonkara View Post
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.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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