0

I cannot login to Magento 2 admin due to the fact it is installed on 127.0.0.1:8080. This is an imported site and not a fresh install.

I have changed cookie domains to reflect the correct paths but still no admin access.

Anyone have any ideas?

enter image description here

enter image description here

  • changed base URLs? – Greg Feb 23 '18 at 16:57
  • yes thats what i find really weird ive changed everything i can think of – Brad Holmes Feb 23 '18 at 16:58
  • is the login pop up there for admin login? Or 404? do you get error when trying to log in? – Greg Feb 23 '18 at 16:59
  • You did not sign in correctly or your account is temporarily disabled. is the error message i get when login in – Brad Holmes Feb 23 '18 at 17:01
  • did you check the database connection? – Abhishek Panchal Feb 23 '18 at 17:03
1

Try creating a new user:

bin/magento admin:user:create --admin-user="testing" --admin-password="123123q" --admin-email="testing@example.com" --admin-firstname="Test" --admin-lastname="Test"

When you get error:

No Administrators role was found, data fixture needs to be run

Follow this link for more info: https://www.maxpronko.com/blog/how-to-create-admin-user-in-magento-2-via-command-line

As a quick fix:

Delete value of following from table core_config_data:

web/cookie/cookie_domain
web/cookie/cookie_httponly
web/cookie/cookie_lifetime
web/cookie/cookie_path
  • [Exception] No Administrators role was found, data fixture needs to be run – Brad Holmes Feb 23 '18 at 17:10
  • maxpronko.com/blog/… have a read. I think it might be that your role name has changed. – Greg Feb 23 '18 at 17:13
  • my role name is admin – Brad Holmes Feb 23 '18 at 17:28
  • check the quick fix i posted in my answer to see if that works – Greg Feb 23 '18 at 19:13
  • 1
    i had to edit the adminaccount.php and add a new user but i am now in thanks – Brad Holmes Feb 23 '18 at 19:22
0

it seems that your account is locked, try unlock by command prompt. open cmd got to you magento directory root and type the following command.

php bin/magento admin:user:unlock <username>

username will be your user name of account. it will be like

php bin/magento admin:user:unlock admin
  • nope unlocked and still the same – Brad Holmes Feb 23 '18 at 17:07
  • in magento 2 it always show that your account is locked when you type wrong password. try create new admin by following command php bin/magento admin:user:create --admin-user="admin" --admin-password="123123q" --admin-email="admin@example.com" --admin-firstname="Admin" --admin-lastname="Admin" change new admin username , passowrd and email – Atif Aqeel Feb 23 '18 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.