skip to Main Content

I just upgrade from Magento 1.9.3.3 (form key disabled) to 1.9.3.7. Now I cannot login to the backend. The error message is ‘You did not sign in correctly or your account is temporarily disabled.’

I tried to reset the cookie domain, clear the cache and session from both server and browser and still no luck.

There are many posts concerning magento 2, but far less talking about magento 1. Does someone with magento 1 had and solved this issue? Thanks for your help in advance!

6

Answers


  1. Chosen as BEST ANSWER

    After a bit of googling around I found there are many people having various versions of issues which all have the common root to 'session keys'.

    Solution: go to 'System->configuration', in section (left menu) choose 'General->Web'. On the main content, go to 'Session cookie management'. All these parameters can be tweaked according to your needs. However, to solve the login problem, just change the cookie domain to '.example.com', replace the example with your domain name and the dot in the front of the string is important.

    Explanation: During login, magento will lay 2 cookies (among other sessions). one is 'domain.com'=>value1, the other one is '.domain.com'=>value2.

    The value1 should equal to value2. If they don't, the cannot login will happen. By setting the '.example.com' as the domain instead of 'example.com', Magento will somehow force set these 2 values equally.

    I have problem with only Chrome, all the other browsers will give equal answer to the values. Could this be a Chrome thing?


  2. Magento admin panel login message shows which are set in admin session. Magento 1.9.X Mage::throwException() not works for login message.
    So if you want to check the exact error(Event if wrong username & password) change in file app/code/core/Mage/Admin/Model/Session.php

    public function login($username, $password, $request = null)
    {
        .....
        } catch (Mage_Core_Exception $e) {
            $e->setMessage(
                Mage::helper('adminhtml')->__('You did not sign in correctly or your account is temporarily disabled.')
            );
            .....
        }
        .....
    }
    

    Every times show below message so instead of that set error message as below.

    public function login($username, $password, $request = null)
    {
        .....
        } catch (Mage_Core_Exception $e) {
            $e->setMessage($e->getMessage());
            .....
        }
        .....
    }
    
    Login or Signup to reply.
  3. Check your admin_role DB table data against a backup. The data in mine got erased due to a DB server crash.

    This was the only way to resolve this issue for me.

    Login or Signup to reply.
  4. @himansu answer led me to discover that the ReCaptcha extension I had installed and enabled for the admin login was causing the error. Disabling the extension from MySQL cleared up the problem and allowed me to login.

    In my case, I went to the core_config_data table and set ‘aminvisiblecaptcha/backend/enabled’ to a value of ‘0’. This is a setting for Amasty’s Google ReCaptcha extension.

    Login or Signup to reply.
  5. It occurrences when your username is blocked by many times of tries with wrong pass or other issues.

    For me, I had a incredible cache, and I removed var/cache and var/full_page_cache, and tried to restart web server (nginx in my case).

    So I had to debug, I found this class with authenticate method adminAuthenticate():
    app/code/core/Enterprise/Pci/Model/Observer.php

    PHP was bringing always wrong value with "first_failure" and "lock_expires" for correct register (my user).

    So I just comment those lines, for clear the "trash":

    // check whether user is locked
    if ($lockExpires = $user->getLockExpires()) {
        $lockExpires = new Zend_Date($lockExpires, Varien_Date::DATETIME_INTERNAL_FORMAT);
        $lockExpires = $lockExpires->toValue();
        if ($lockExpires > time()) {
            throw new Mage_Core_Exception(
                Mage::helper('enterprise_pci')->__('This account is locked.'),
                self::ADMIN_USER_LOCKED
            );
        }
    }
    

    And post again login, so that’s OK, and uncoment that lines. The problem did not occur anymore.

    Login or Signup to reply.
  6. I have also faced this same issue on Magento 1.

    It might be a database issue.

    It might be some issue in the database. Check the “admin_user”, if the entry is missing for the same which you are trying then create the admin user by using below SQL query:

    LOCK TABLES `admin_role` WRITE , `admin_user` WRITE;
     
    SET @SALT = "rp";
    SET @PASS = CONCAT(MD5( CONCAT(@SALT, "your_password") ), CONCAT(":", @SALT));
    SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;
     
    INSERT INTO `admin_user` (firstname, lastname, email, username, password, created, lognum, reload_acl_flag, is_active, extra, rp_token_created_at) 
    VALUES ('FirstName', 'LastName', '[email protected]', 'your_username', @PASS,NOW(), 0, 0, 1, @EXTRA,NOW());
     
    INSERT INTO `admin_role` (parent_id, tree_level, sort_order, role_type, user_id, role_name) 
    VALUES (1, 2, 0, 'U', (SELECT user_id FROM admin_user WHERE username = 'your_username'), 'FirstName');
     
    UNLOCK TABLES;
    

    For more information, please refer to the below URL.
    https://www.itechinsiders.com/magento-error-you-did-not-sign-correctly-or-your-account-is-temporarily-disabled/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search