Announcement

Collapse
No announcement yet.

Ability to change 'admin' password if it is lost?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ability to change 'admin' password if it is lost?

    I have a test Mirth box running on Windows with a derby database.

    It has not been used very much and since the original install, the admin password has been lost. (unfortunately, the defaults do not work).

    Is it possible to change or modify the admin password through the DB or any other mechanism?

    My worst case scenario would be to uninstall Mirth and reinstall it, but I thought I would post this question in the forum for future documentation since I didn't find this addressed anywhere else.

    Thanks in advance!
    Jimmy
    - Denver, Colorado

  • #2
    If the channels have been exported or the system backed since the last changes were made; you could try re-installing the Mirth application and importing the channels. The other option is try using the Squirrel SQL client. It can connect to the Derby Database.
    Tom Smith
    IT Director
    Triad Radiology Associates

    Comment


    • #3
      Originally posted by TSmithTRA View Post
      If the channels have been exported or the system backed since the last changes were made; you could try re-installing the Mirth application and importing the channels. The other option is try using the Squirrel SQL client. It can connect to the Derby Database.
      I'll see what I can figure out with the client. But I'm not sure I'll be able to connect to the DB since I don't even know a password... Seems like I'm stuck.
      Jimmy
      - Denver, Colorado

      Comment


      • #4
        Sounds like it. When was the last time the channels were exported or the backup was run from within MIRTH? If it is recent enough all the channels are in the XML files created by the export or backup.
        Tom Smith
        IT Director
        Triad Radiology Associates

        Comment


        • #5
          I didn't setup the box. I have no idea what is in there. Nothing has been exported as far as I'm aware. Again, it's a test box. I thought I'd try to gain access to the box first, before I just remove the install and re-install.

          Looks like I'll be re-installing.

          Thanks for the suggestions. (Downloading Squirrel client now)
          Jimmy
          - Denver, Colorado

          Comment


          • #6
            Good Luck!
            Tom Smith
            IT Director
            Triad Radiology Associates

            Comment


            • #7
              Originally posted by TSmithTRA View Post
              Good Luck!
              Thanks!
              Jimmy
              - Denver, Colorado

              Comment


              • #8
                You can re-insert the default encrypted password into the database from the sql script that comes with mirth. This is "admin" with a one-way md5 encryption and salt.
                Jacob Brauer
                Director, Software Development
                NextGen Healthcare

                sigpic

                Comment


                • #9
                  awesome! Thank you so much.
                  Jimmy
                  - Denver, Colorado

                  Comment


                  • #10
                    Originally posted by jacobb View Post
                    You can re-insert the default encrypted password into the database from the sql script that comes with mirth. This is "admin" with a one-way md5 encryption and salt.
                    Which version of the SQL installer has a 'script'? I only have Mirth on an appliance (production), and the test boxes I have are both Mac OS (Intel) boxes with full installers that do not have sql scripts inside (i.e. "Show Package Contents").

                    I can download a Linux version installer if the sql script is there. I don't think I'll have a problem one I get the password hash for the original admin user.
                    Jimmy
                    - Denver, Colorado

                    Comment


                    • #11
                      They should be in the root of the MIRTH install directory with an extension of .SQL

                      on a windows box it is C:\Program Files\Mirth\sqlserver2005-database.sql
                      Tom Smith
                      IT Director
                      Triad Radiology Associates

                      Comment


                      • #12
                        Thanks. Found it, yes, you're correct. I should have known that.

                        Next problem is that since I don't know the admin password, how is it going to be possible to execute the overwrite into the db???

                        With the following command, I can just insert a new user with the default 'admin' as a password:

                        INSERT IGNORE INTO PERSON (USERNAME, PASSWORD, SALT, LOGGED_IN) VALUES('newuser', 'NdgB6ojoGb/uFa5amMEyBNG16mE=', 'Np+FZYzu4M0=', FALSE);
                        Jimmy
                        - Denver, Colorado

                        Comment


                        • #13
                          I think the idea is to recreate the table person and reinsert the user admin
                          JJ Mouris
                          FFE Luxembourg
                          IT-Department

                          Comment


                          • #14
                            Hello Jacob,

                            I'm using Mirth 2.1.1.5488.

                            I lost the the admin password and woould like to run that SQl script.

                            I found this in the script:

                            INSERT IGNORE INTO PERSON (USERNAME, PASSWORD, SALT, LOGGED_IN) VALUES('admin', 'NdgB6ojoGb/uFa5amMEyBNG16mE=', 'Np+FZYzu4M0=', 0);

                            Since I'm not too familiard with SQL, can yo guide me how to run that line?

                            I tried to run a new query, drop that line in and execute.

                            I'm getting that error message:

                            Msg 207, Level 16, State 1, Line 1
                            Invalid column name 'PASSWORD'.
                            Msg 207, Level 16, State 1, Line 1
                            Invalid column name 'SALT'.

                            Any idea?

                            BTW, I do not see any PASSWORD and SALT columns in the PERSON DB.

                            Comment


                            • #15
                              I also have a derby db that I do not have a password to. Is there a limit to password attempts before lock out? I can think of 5-10 things it might be but do not want to shoot myself in the foot.

                              Comment

                              Working...
                              X