All my administrator accounts to login to the backend of the website is inactive. I cant login to change it because it shows access denied, how can i change it.

I have ftp access and cpanel access.

4 Answers 4


In phpMyadmin go to admin_user table and you can edit is_active. 1 is active, 0 is not.

Afterwards, reset the Magento cache and you should be able to use the account to login.

If this value is already set to 1, then the account is active but you are not entering the correct password when you login.

If you have an email address associated with the account (and you can check that email), you can use the password reset functionality on the login page to have an update password link sent to your account so you can reset the password.

If you do NOT have an email address associated with the admin login, you will have to use the instructions here to manually update the password in phpMyAdmin and use the MD5 hashing algorithm to allow the account to log back in.

  • Thanks for the answer, i checked it was 1 already. The message it comes up is access denied
    – CCTV
    Commented Dec 11, 2015 at 16:54
  • If it is set to 1 then the user is active. The Access Denied message is telling you that you don't have the correct password for that user account. Commented Dec 11, 2015 at 16:58
  • Password is right if i place a wrong password it will say "Invalid User Name or Password."
    – CCTV
    Commented Dec 11, 2015 at 16:59
  • You can try to clean up your browser's cash. or try to login from different browser, and delete cookies.
    – mxsxs2
    Commented Dec 11, 2015 at 17:04
  • Can you confirm if the access denied message is being generated by Magento or your web server? Perhaps share a screenshot? If you're getting an apache or nginx access denied message, that's probably a file or directory permissions problem and not a Magento authentication error. Commented Dec 11, 2015 at 17:05

Well if it's "Access denied" from Magento then, you can create another alternative admin account.

Login to phpmyadmin, select your Magento database and click on the "SQL" tab and run the following query.

LOCK TABLES `admin_role` WRITE , `admin_user` WRITE;

SET @SALT = "rp";
SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), CONCAT(":", @SALT ));
SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;

INSERT INTO `admin_user` (firstname,lastname,email,username,password,created,lognum,reload_acl_flag,is_active,extra,rp_token_created_at) 
VALUES ('Firstname','Lastname','[email protected]','myuser',@PASS,NOW(),0,0,1,@EXTRA,NOW());

INSERT INTO `admin_role` (parent_id,tree_level,sort_order,role_type,user_id,role_name) 
VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = 'myuser'),'Firstname');


Set 'Username' and 'Password' to your choice.

Then you can login with the newly created Admin account and verify or change access restrictions by navigating to:

System > Permissions > Users


System > Permissions > Roles

Visit this tutorial for more info on "Roles and User management".

Hope this resolves your issue.

  • Shall i just copy and paste the above code into the sql query and where shall i place the username and pass
    – CCTV
    Commented Dec 11, 2015 at 17:43
  • Yes just paste the above code into "SQL" tab. Replace 'myuser'(keep the single quotes), in both the INSERT INTO... queries, with your desired username and "password"(keep the double quotes) in line SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), CONCAT(":", @SALT )); with your desired password. Then execute the query.
    – Vicky Dev
    Commented Dec 11, 2015 at 17:54

I have to add that this also sounds like an issue that I've encountered recently with the user's role. If you by accident set your user's group's resource access to custom without checking any values (I did), you will be completely locked out of the admin panel.

You need to make sure that the values in the admin_role and admin_rule tables are correct to give your user complete access.


Just clear your cookies... Admin can block access.

Check var folders owner and rights if you use file sessions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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