Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid login and password #3758

Closed
claudiumitreaa opened this issue Mar 14, 2016 · 12 comments
Closed

Invalid login and password #3758

claudiumitreaa opened this issue Mar 14, 2016 · 12 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@claudiumitreaa
Copy link

Steps to reproduce
Upgrade magento 1.7.x to 2.0.x with migration data tool from ubertheme.

Expected result
All is ok.

Actual result
When I try to login with any customer email and password I got "Invalid login and password.", but in the old store, the same customers working perfectly.

@shuaiZend
Copy link

key Different.
vi magento1/app/etc/local.xml
find key.

look like :
<crypt> <key><![CDATA[5f02266b3f25c72cf5e812a5f26616xx]]></key> </crypt>

and find M2 key

vi magento2/app/etc/env.php

find key.

look like :
array ( 'key' => '13153a1888aec0d4e88734fe286369xx', ),

copy M1 key Value to M2.

and login again.

@claudiumitreaa
Copy link
Author

Thanks for your answer!
I made the changes, now in some accounts I can login but in another, still I got "Invalid login and password." .
I check the password_hash field from table customer_entity and for the accounts where I can login, the password look like "db2408d6bc4c99ea09baf9701f241886:PP:0" instead for the accounts where I can't login password look like "db2408d6bc4c99ea09baf9701f241886:0".

@shuaiZend
Copy link

PP is salt.
Here is how a password's hash is generated in Magento 2:
magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L155-L162
return implode( self::DELIMITER, [ $this-&gt;hash($salt . $password), $salt, $version ] );

@quienti
Copy link
Contributor

quienti commented Mar 15, 2016

https://github.com/ubertheme/module-ubdatamigration/blob/master/README.md

Upgrade Password Hash (This is optional task for more security): In your terminal window run bellow command php -f PATH_YOUR_MAGENTO_2/bin/magento customer:hash:upgrade upgrade customer password_hash

@claudiumitreaa
Copy link
Author

I run your command and I got this
Exception trace:
() at /home/storekpiin/public_html/store/vendor/magento/module-customer/Console/Command/UpgradeHashAlgorithmCommand.php:67
Composer\Util\ErrorHandler::handle() at /home/storekpiin/public_html/store/vendor/magento/module-customer/Console/Command/UpgradeHashAlgorithmCommand.php:67
Magento\Customer\Console\Command\UpgradeHashAlgorithmCommand->execute() at /home/storekpiin/public_html/store/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at /home/storekpiin/public_html/store/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /home/storekpiin/public_html/store/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at /home/storekpiin/public_html/store/vendor/magento/framework/Console/Cli.php:49
Magento\Framework\Console\Cli->doRun() at /home/storekpiin/public_html/store/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at /home/storekpiin/public_html/store/bin/magento:25

error

@maksek
Copy link
Contributor

maksek commented May 9, 2016

This issue belongs to migration tool, not magento 2 core. Please open issue with steps in according repo - https://github.com/magento/data-migration-tool

@maksek maksek closed this as completed May 9, 2016
@likhamahudda
Copy link

likhamahudda commented Jun 29, 2017

After migration M1 to M2
old customer login error resole
Please update this query in database

UPDATE customer_entity_varchar,customer_entity SET customer_entity_varchar.value = customer_entity.password_hash WHERE customer_entity_varchar.entity_id = customer_entity.entity_id and customer_entity_varchar.attribute_id='12'

attribute_id means password type values id in customer_entity_varchar table

main problem old password value and new password values not match in magneto

login_password

passwordmissmtah

@Krupaly2k-zz
Copy link

Hi likhamahudda,

I have tried above solution but still I am facing same issue. I am unable to login with Magento1 customer account. I am using Magento 2.1.6 version. Please help me to resolve this issue soon.

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Oct 2, 2017
@claudiumitreaa
Copy link
Author

in magento 1.x the password is encrypted using md5, in magento 2 is not used md5, that is the reason you can’t log in after migration
i fixed that with some custom code, but i modified somethig in vendor
leave me your email and i’ll send you my solution, maibe it helps you

@claudiumitreaa
Copy link
Author

claudiumitreaa commented Oct 3, 2017 via email

@likhamahudda
Copy link

Hello,

I got another solution and very quick and easy

Just Empty the table (TRUNCATE) " customer_entity_varchar "

100% sure login old customer in New magento 2

Thanks

@mariamghalleb
Copy link

@likhamahudda how to empty that table ? whats the command please..

I imported users from magento 1.3 to a magento 2.2 through csv with their old password_hash that looks like this b67f0da6abeaa55560701296df7f05d7:3K

would your solution convert the passwords? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

10 participants