Q:

Magento 2 User Access Permission

I am developing a Store in Magento 2. I created an Admin Account at the time of installation of Magento 2. Later I tried to create another User (Who can only add product in the store) from Admin Panel and a User Role (Which has only product entry access). In this time I assigned Admin User to that specific role (Product entry).
Then I install a Magento 2 in local host and replaced all the data of admin_user , authorization_role, authorization_rule table of database to regain access of Admin User. But when I tried to login using that Admin User I am getting a Message  You need more permissions to access this. I attached a screenshot below. How can I get previous Admin User with previous Access?

A:

The fastet option you have is to create a new admin and reset the previous user's permissions.
You can do it from command line.
Move to your Magento's root and type:
php bin/magento admin:user:create \
    --admin-user="mynewuser" \
    --admin-password="mynewpassword" \
    --admin-email="john@doe.com" \
    --admin-firstname="MyName" \
    --admin-lastname="MyLastName" 

This will create a new admin user with username mynewuser and password mynewpassword.
When you are in just fix your old admin user.

