• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Resetting user database via the SQL console

    User help
    3
    6
    1.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      psysak
      last edited by

      Hello all, I'm pretty new so please bear with me. I've searched around but can't find my answer. I'm trying to save an existing project which seems to have had some kind of issues and now it appears that the user login info is corrupt or something is broken. I have the SQL console all setup and running, I can see the users in the USERS table but cannot login to the main mango login page with any of the credentials I've been given. Is there a way I can reset the user passwords to blank or some known value via the console?

      Thank you
      Peter

      P 1 Reply Last reply Reply Quote 0
      • P
        psysak @psysak
        last edited by

        Or, let me ask a different question. Assuming this database is somehow corrupt, how could I save a bunch of the config info to copy into a new database?

        1 Reply Last reply Reply Quote 0
        • P
          psysak
          last edited by

          I got this resolved if anyone wonders about this in the future.

          To see the users run SELECT * FROM USERS
          To set a user's password run
          UPDATE USERS SET PASSWORD = '{NONE}password' WHERE USERNAME = 'admin'

          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire
            last edited by

            Thanks for posting that up there @psysak Sorry I didn't see this post before you called yesterday.

            For anyone else reading this, make sure you change the password in the Mango UI afterwards so the password is not stored in the database in plaintext.

            Developer at Radix IoT

            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              This strategy for recovery only works after Core 2.8 as in Core 2.7 passwords were all SHA1 hashes and they were not marked as such.

              1 Reply Last reply Reply Quote 0
              • P
                psysak
                last edited by

                Just to further elaborate, PASSWORD = '{NONE}password' would result in the password being reset to "password" in Code 2.8+. However, I have a version 2 system so the '{NONE...' portion doesn't work. Instead, I have to get a SHA1 result for a password I want to enter, such as the word "password", run it through a hex to base64 converter and enter that into the PASSWORD field. :)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post