We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25315
    • 68 Posts
    Hi.

    I am unable to log into modx.

    I set up a local fresh install yesterday. It only has one user - admin, with password admin.

    After a day I went to log in, and found myself unable to do so.

    I have tried changing admins password in mysql:

    mysql> update modx_manager_users SET password=MD5("admin") where username="admin" ;
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 1  Changed: 0  Warnings: 0
    


    However, I am still unable to log in as admin using password ’admin’.

    This is very frustrating.
    What do I need to do ?
      • 36549
      • 572 Posts
      can’t you click on the forgot password link at login?
        www.9thwave.co.uk
           WEB | DESIGN | PRINT
        • 25315
        • 68 Posts
        Quote from: janice171 at Feb 16, 2010, 04:26 PM

        can’t you click on the forgot password link at login?

        Yes, I can.

        However, it’s a local install on a machine that does not have sendmail set up.

        I want to avoid having to set up sendmail.
        I’d rather reset the admin password in sql, if this is still possible to do with modx.

        Also, even if I did set up sendmail, I can’t remember the email address.
        I actually tried this, in case I could find an email in an outgoing mail spool somewhere. But when I tried, modx alerts me that no such email address is in use.
          • 3749
          • 24,544 Posts
          Look near the bottom of this page: http://bobsguides.com/modx-newbie-faq.html. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 25315
            • 68 Posts
            thanks.

            I zero’d some the time to wait after failed logins, but I got no results.

            I tried zero’ing that time, and then resetting the admin passwd.
            No luck.

            So I reinstalled.

            It’s just a fresh install, so I didn’t loose anything.
            But it’s good to have this post as a reference to check in case this happens again.

            Cheers.
              • 25315
              • 68 Posts
              This is really weird.

              About four times now, I have installed modx on a local test machine.

              Because it’s a local install, and I don’t have to worry about security too much, I always set the user/password to admin/admin.

              Every time I’ve installed, the cms eventually "forgets" my password.

              I leave the cms for a day or two. I go back
              Logging in as admin, password admin, the login fails.

              Every time I have deleted the installation and the dropped the database, starting afresh.

              What could be happening here ?
                • 3749
                • 24,544 Posts
                That’s extremely odd. I would make a note of the password hash in the users table password field in PhpMyAdmin. Then look again when you can’t login to see if it’s changed or gone. I’ll be that it’s still there and the problem is elsewhere.

                I haven’t looked at the login code for a while, but I think it sets a cookie or $_SESSION variable with your input, then checks that against the DB. So it could be a session or cookie problem.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 25315
                  • 68 Posts
                  Yeah, it is extremely odd.
                  I can’t for the life of me guess what could be causing it.

                  I’m not using phpmyadmin.

                  Is there a way to get the password hash from the mysql prompt ?

                  btw - this has happened again.
                  Last night I deleted the old install and dropped the database.
                  I freshly installed modx, using admin/admin as user/pass.
                  This morning I am locked out of my fresh install again.

                  This is a local machine. No one else has access to it or it’s databases.

                  The first thing I noticed last night, was that I could log in with firefox, but not chrome.
                  I deleted all cached informations in chrome, logged out in firefox, and tried again to log in with chrome. To no avail.
                  But, I could log in again with firefox.
                  I logged out before I went to sleep. And found that I couldn’t log in in either browser this morning.

                  I’m as fascinated as I am frustrated with this problem.

                  I am currently testing a bunch of cms’s on this server. I don’t have this problem with any other cms install.

                  It’s a laughably bizarre problem. But it’s certainly an obstacle.
                    • 3749
                    • 24,544 Posts
                    If you can log in in any browser, the credentials are still there in the DB (and it would be really odd if they weren’t anyway).

                    I think I was wrong about the session/cookie thing, the login is handled directly.

                    You could play with the code in manager/processors/login.processor.com (or just comment out the password check around line 173) and get on with your life. wink
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 25315
                      • 68 Posts
                      I’m afraid that I can’t log in on any browser.

                      Does that mean the database is somehow getting messed up?

                      Yeah, I could get rid of password checking. But it would really bother me have it in the back of my mind that this problems exists.