1

I have created a admin user by below command.

php bin/magento admin:user:create --admin-user="admin1" --admin-password="admin@123" --admin-email="admin1@gmail.com" --admin-firstname="fname" --admin-lastname="lname"

Now, Admin is login successfully but I do not have permission for anything in admin. Below is the Error.

Sorry, you need permissions to view this content. Please help me how can I solve this.

0

There are some other things that you can have to do to have access again.

As far as I know, if you do not have access to the back-office, you will not be able to change permission for the new user.

In that case, you will need to do plain sql modifications as explained in this post : Reset roles for Magento 2

If you have access with another user to the back-office, go to Magento documentation about admin users and follow instructions for the user with restricted access. It will unlock the permission for the other user.

  • Thanks @Christophe I have try with your suggested URL(Reset roles for Magento 2) but it's not working for me. – user7064432 Dec 13 '18 at 8:56
  • Can you please provide me with the queries you've made ? Update your question for more clarity. – Christophe Ferreboeuf Dec 13 '18 at 9:39
0

If you have recently done your Magento setup and facing this issue,

Clear all the cache and generated folder. Please let me know if this works, thank you!

rm -rf var/* generated/*

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.