How to Reset Magento Admin User, Role and Resources Permission to all

Suppose, by mistake you have to define wrong permission of main admin User and you can not reset all permission in main admin user.

main admin user

You define wrong permission of main admin .

define wrong permission of main admin

Set wrong permission and you can not reset in main admin user .

Set wrong permission

Solution

Open database follow the step:

Step 1: Get current admin role details.

  1. SELECT * FROM admin_role WHERE role_name = 'Administrators'  
  2. /*Administrators - is Your admin role name*/  
run sql query

Administrators

Step 2: Remove Existing permissions for the Admin role:
  1. /*clean all permission rules*/  
  2. DELETE admin_rule  
  3. FROM admin_rule, admin_role  
  4. WHERE  
  5. admin_role.role_name = 'Administrators' /* Your admin role name*/  
  6. AND admin_rule.role_id = admin_role.role_id  
my admin

Click go button.

Step 3: Update Permission rule for the admin role.

Update Permission

Click go button.

 admin role

Log out & try to login with your credentials to logged in.

So you can reset all permission to the main admin user.

login with your credentials