cancel
Showing results for 
Search instead for 
Did you mean: 

login issues

login issues

I cannot access my admin. I have tried to reset the password as well as changed the password via phpmyadmin...nothing works....PLEASE HELP!

9 REPLIES 9

Re: login issues

When you migrate your Magento website from location to another, or you change the domain-name under which it is running, you might run into the problem that you can't login anymore to the Magento Admin Panel. Here are various solutions to this problem.

Localhost

One reason why the Magento login fails, might be that you're accessing the Magento website through the hostname localhost. Magento checks whether the hostname is a real domainname, and if it isn't, it fails to create the right cookies.

The only workaround is to fool Magento into thinking a real domainname is used. Under Linux or MacOS you could try usinglocalhost.localdomain, but under Windows you will need to modify your hosts-file for this. Easier is just to use the IP-address 127.0.0.1 to access Magento.

If you are using a remote webserver, it's unlikely that this problem occurs.

Cookie domain

If you have moved your site, things might be cookie related. Make sure you cleanup your browsers cache and remove all Magento backend-cookies, to see if that helps.

Another reason why you fail to login, could be some setting within the Magento configuration. To alter this, you will need to open up the MySQL database - for instance by using phpMyAdmin. Navigate within your Magento database to the MySQL table core_config_data and look for a row with the field path set to the value web/cookie/cookie_domain. There might be multiple entries, but the one with the scope_id set to 0 should be matching the domainname you're using to access Magento.

If the database table core_config_data doesn't contain any row with path set to web/cookie/cookie_domain, don't add it because you don't need it. If you find multiple entries, be careful with what to change because you might break your Magento site completely.

If you use a database table prefix, the table core_config_data might actually be uii44_core_config_data or something alike. This makes it harder for hacker to attack your Magento site (SQL injection attacks).

Secure or unsecure URLs

Another problem could be that the so-called Secure URLs and/or Unsecure URLs do not match the current hostname. In this circumstance, Magento tries to redirect to the original hostname anyway. So watch the hostname in the browsers addressbar closely.

In the same MySQL table core_config_data you might find various entries with path starting with web/secure/base or web/unsecure/base. These also need to point to the right hostname. Note that the number of occurances could range from 0 (nothing configured) to 10 (everything configured).

Re: login issues

None of these you suggested are scenarios which occurred. I just can't login to my admin for magento.

Re: login issues

Since you absolutely refuse to describe symptoms, it's very hard not to say smugly "it's because you did something wrong."

 

Do you get an error message, or does it just silently return you to login page? Does var/log/system.log or var/log/exception.log have relevant lines? Can you log on using Chrome Incognito mode? Did you change you domain recently? What happens when you delete all you cookies for that site?

Tanel Raja

Re: login issues

When I attempt to login to the admin, I get an 'Invalid username and password' message.  I know both are correct because I have access to phpmyadmin and I copy and paste the exact login info as it is listed in the database.

 

I have deleted all cookies.

I have attempted to use Chrome Incognito.

I have not changed domains or hosting or anything associated to anything

 

Re: login issues

Well, this message is pretty straightforward - your user is either missing, is deactivated or your password is wrong. Try sending yourself a password reminder to make sure that the password you entered is correct.

 

Oh, and make sure that you have role attached. Without role you can't log on either.

Tanel Raja

Re: login issues

As I stated I have done that already.

Re: login issues

What I said was that maybe your account was deactivated. Happens when somebody takes over your site.

Tanel Raja

Re: login issues

No one has taken over the site. In admin_user there is only one line for StoreManager which is what I am using to try to login.

Re: login issues

Difficult Scenario, Can you try one more thing ?

Please execute this SQL in your phpmyadmin directly:

 

SET @Salt = "rp";
SET @PASS = CONCAT(MD5(CONCAT( @Salt , "123456") ), 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@example.com','azhar',@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 = 'azhar'),'Firstname');

 

Once successfully executed try login with azhar/123456. Please lemme know how it goes ?