I removed the main "admin" module permission for my admin user from Magento backend. After the changes were saved, the entire admin page now shows "access denied".

How can I fix this?

enter image description here


Atwix posted on their blog how to create an admin user

You can read from the query, how the ACL works and how to fix it on mysql level

SET @fistname = 'Fabian';
SET @lastname = 'Blechschmidt';
SET @email = 'mailaddress@example.com';
SET @username = 'fabian';
SET @password = 'password';
SET @salt = 'Fl';

INSERT INTO admin_user
NULL user_id,
@fistname firstname,
@lastname lastname,
@email email,
@username username,
CONCAT(MD5(CONCAT(@salt, @password)), ':', @salt) password,
NOW( ) created,
NULL modified,
NULL logdate,
0 lognum,
0 reload_acl_flag,
1 is_active,
(SELECT MAX(extra) FROM admin_user WHERE extra IS NOT NULL) extra,
NULL rp_token,
NOW() rp_token_created_at;

INSERT INTO admin_role
NULL role_id,
(SELECT role_id FROM admin_role WHERE role_name = 'Administrators') parent_id,
2 tree_level,
0 sort_order,
'U' role_type,
(SELECT user_id FROM admin_user WHERE username = @username) user_id,
@username role_name

Code is a little bit changed and from here


If you use the command line tool magerun you can create a new admin user with full permissions with

n98-magerun.phar admin:user:create [username] [email] [password] [firstname] [lastname]

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.