4

when I log into my admin panel, I get up this message "Access denied"

How can I fix the problem? I can not access anything without logging in?

Mukesh
  • 7,630
  • 21
  • 105
  • 159
Max
  • 73
  • 1
  • 1
  • 5

5 Answers5

7

When this problem occurs after adding a new user, the problem could be that no role for that user is selected.

If you can still login with another user, you can simply select a role for the new user and the problem will be solved.

To select a role, go to: System > Permissions > Users > [Select User] > User Role (tab).

Gerard de Visser
  • 7,590
  • 9
  • 50
  • 58
3

If you have lost access to you admin page only, then you can go into your database and change the password by following method

  1. Enter into your database and search for admin_user table
  2. In admin_user table click the edit button on the row who you feel is the admin.
  3. In the password field, select the function as MD5 form the drop-down in the function column.
  4. Now in the value field, type the password and hit Go.

This way you can reset the password and make sure you are entering the correct password an d username. (the above method I am suggesting assuming that you cannot even enter the admin page)

Another method I am suggesting assuming that your access is denied for some particular module.

  1. Enter in to your magento files and navigate to the file named system.xml
  2. See how many groups you are having in the system.xml file as following

`

   <system> 
   <children>
    <config>
    <children>
    <my_group_name>
    <title>My Group Name</title>
    </my_group_name>
    <second_group_name>
    <title>My Second Group Name</title>
    </second_group_name>
    </children>
    </config>
    </children>
    </system>

Here I am showing two groups

3.Navigate to the config.xml file and add both groups names as children in config.xml

<config>
    <modules>
       ...
       ..
       .
    </modules>
    <frontend>
        ...
        ..
        .
    </frontend>
    <admin>
        ...
        ..
        .
    </admin>
    <adminhtml>
        <menu>
            ...
            ..
            .
        </menu>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                        <MyCompany_MyModule>
                            <title>My Module</title>
                            <sort_order>10</sort_order>
                        </MyCompany_MyModule>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <my_group_name>
                                            <title>My Group Name</title>
                                        </my_group_name>
                                        <second_group_name>
                                            <title>My Second Group Name</title>
                                        </second_group_name>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
        <layout>
            ...
            ..
            .
        </layout>
    </adminhtml>  
    <global>
        ...
        ..
        .
    </global>
</config>

Source http://blog.chapagain.com.np/magento-access-denied-in-admin-of-custom-module/

hope this is helpful

Venkateshwaran Selvaraj
  • 1,745
  • 8
  • 30
  • 60
0

Follow these steps:

1)Are you entering correct username and password?

2)If you are facing problem when you are trying to login using chrome.(try url like 127.0.0.1/yourmagento)

OR try this link why-i-can-not-login-to-magento-backend-using-google-chrome

To reset admin password.Go to phpmyadmin and run following command.

UPDATE `admin_user` SET `password` = MD5('PASSWORD') WHERE `username` = 'USERNAME';

Still facing any problem add comment.I will try to help you.

Community
  • 1
  • 1
Mukesh
  • 7,630
  • 21
  • 105
  • 159
0

Try to delete the cache folder.

\magento\var\cache

Delete all files and folders.

Covani
  • 1
0

I had to add an entry for my user in mageadmin_role and it only worked after I selected "U" instead of "G" as the role

Black
  • 18,150
  • 39
  • 158
  • 271