PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

Lost password? the solution is in the forum but in french

31 replies to this topic
#1
ultraplano

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts
Hi,

Congratulations on a great e-commerce software.

I've lost the password for my localhost install, and I didn't have a SMTP server available.
After some time searching this forum, i've found a solution on a french post:

http://www.prestasho...de_passe_oublie

Basically, what you have to do is do a md5 of your cookie_key + your_password. Just go to your DB Admin, and execute a sql like this:

update set passwd=md5('<_COOKIE_KEY_>') where email=''

Just REPLACE the strings (<>) above with the right data:
= name of the employee table
<_COOKIE_KEY_> = the string on your settings.inc.php
= your new password
= email of the account you want to change.

After this, you should be able to login to the backoffice.
Hope it helps someone saving some time. ;)

Regards,

Pedro

#2
Madrilene

    PrestaShop Apprentice

  • Members
  • PipPip
  • 171 posts
Hello Pedro
very nice of you of posting a solution

Can you give me the right SQL syntax, because phpmyadmin send me back error message ?

(i give invented e- mail and so and)

update ps_cocoemployee set passwd=md5(’7dFDSGEZWafkC3EZbnbXOkojfdzvMa2qguPbPK1spU76JmN29IiAPK','coco’) where email=’nini@mageos.com’

thank you

#3
target_locked

    PrestaShop Apprentice

  • Members
  • PipPip
  • 129 posts
I got this error:
It seems that MySQL does not understand the word MD5 !!!
Any advice ?
Thanks.

[quote]
Error
SQL query:

UPDATE ps_employee SET passwd = md5( ’hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi’ ) WHERE email = ’myemail@yahoo.com’

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@yahoo.com' at line 1
[quote]

#4
Madrilene

    PrestaShop Apprentice

  • Members
  • PipPip
  • 171 posts
hi i'm not a sql specialist, but first i think there is no space beetween
password and =
after i can not tell you more, andi'm willing to know what the right syntax is....

#5
spirit

    PrestaShop Newbie

  • Members
  • Pip
  • 16 posts
I don't think it's a problem with spaces. Maybe you need quotes around your md5 call as paswd is probably a varchar

#6
ultraplano

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts
Hi guys,

Sorry for the delay. The solution I've posted worked for me.
Let's try it again with this sample data:

TABLENAME = ps_employee
COOKIE_KEY = hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi
NEWPASS = prestashop
YOUREMAIL = root@localhost.com

The code for this is:



update ps_employee set passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiprestashop") where email="root@localhost.com"



You can use double or single quotation marks for the string in md5 or the email.

Hope this helps.

#7
ultraplano

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts

From 1219937173:

Hello Pedro
very nice of you of posting a solution

Can you give me the right SQL syntax, because phpmyadmin send me back error message ?

(i give invented e- mail and so and)

update ps_cocoemployee set passwd=md5(’7dFDSGEZWafkC3EZbnbXOkojfdzvMa2qguPbPK1spU76JmN29IiAPK','coco’) where email=’nini@mageos.com’

thank you


I've just noticed you have two parameters on the md5 function, but you only need one.
The right statement should be:


update ps_cocoemployee set passwd=md5("7dFDSGEZWafkC3EZbnbXOkojfdzvMa2qguPbPK1spU76JmN29IiAPKcoco") where email="nini@mageos.com"


Try it and tell us if it works.

#8
target_locked

    PrestaShop Apprentice

  • Members
  • PipPip
  • 129 posts

From 1219991981:

Hi guys,

Sorry for the delay. The solution I've posted worked for me.
Let's try it again with this sample data:

TABLENAME = ps_employee
COOKIE_KEY = hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi
NEWPASS = prestashop
YOUREMAIL = root@localhost.com

The code for this is:



update ps_employee set passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiprestashop") where email="root@localhost.com"



You can use double or single quotation marks for the string in md5 or the email.

Hope this helps.


I tried but failed, the SQL can run successfully but when I login Presta say nothing and return to the login page.

By the way, in your SQL statement, you added "prestashop" to the end of cookie_key string? In that way do I have to modifythe cookie_key in the file "settings.inc.php" ?

If I modify "settings.inc.php" to be "hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiprestashop" the error is:

Quote



There is 1 error

1. employee does not exist, or bad password




#9
ultraplano

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts
You shouldn't change your settings.inc.php.
Please post here the following data:

EMPLOYEE TABLE NAME, COOKIE_KEY (from settings.inc.php), YOUR NEW PASS (whatever you want) and the EMAIL ACCOUNT you want to change the pass

I'll try to provide the right sql and explain it.

#10
target_locked

    PrestaShop Apprentice

  • Members
  • PipPip
  • 129 posts

From 1219995019:

You shouldn't change your settings.inc.php.
Please post here the following data:

EMPLOYEE TABLE NAME, COOKIE_KEY (from settings.inc.php), YOUR NEW PASS (whatever you want) and the EMAIL ACCOUNT you want to change the pass

I'll try to provide the right sql and explain it.


Hi ultraplano,
Assume that the data as follows:
EMPLOYEE TABLE NAME: ps_employee
COOKIE_KEY: 'hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi'
New pass: 123456789
Email: abc@yahoo.com

Pls generate the SQL string and explain some about it.
Thanks.

#11
ultraplano

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts
The SQL should be like this:


UPDATE ps_employee SET passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi123456789") WHERE email="abc@yahoo.com"


The MD5 string is composed by the COOKIE_KEY and the PASSWORD, all together.

Did it work?

#12
target_locked

    PrestaShop Apprentice

  • Members
  • PipPip
  • 129 posts

From 1220174171:

The SQL should be like this:


UPDATE ps_employee SET passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi123456789") WHERE email="abc@yahoo.com"


The MD5 string is composed by the COOKIE_KEY and the PASSWORD, all together.

Did it work?



ultraplano,
Thank you very much. It worked. :)

#13
chopi321

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
Guys... it didnt work for me,..
I still can`t login to the admin page...
please a little help...

Thanks.

#14
ejectcore

    PrestaShop Addict

  • Members
  • PipPipPip
  • 827 posts
Do you get an error message?
Many people have had this issue & when they don't receive an error the solution below usually works ;)

You have probably already suggested this, but just in case
Make sure you have the www. in front of your domain

http://www.domain.co.uk/youradmin
Filter Search 2.1 Enterprise Edition Now Available

Available Soon
Filter Search 2.1 Lite Edition

Follow us on twitter

#15
chopi321

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts

From 1223226759:

Do you get an error message?
Many people have had this issue & when they don't receive an error the solution below usually works ;)

You have probably already suggested this, but just in case
Make sure you have the www. in front of your domain

http://www.domain.co.uk/youradmin


Hi,, thanks for the answer..
Well i dont want to try it in the server because i dont want to mess it... so im testing in the mirror i have in my localhost in other pc...

does the solution works in any version?

I have instaled the version ('_PS_VERSION_', '0.9.7.2');

i want to upgrade to version 1, but for that dont i need to login to the admin page?__---

#16
godzookee

    PrestaShop Newbie

  • Members
  • Pip
  • 13 posts
Thank you for the advice that worked perfectly for me.

Thanks again for all the help people here provide.

Regards

#17
sperio

    PrestaShop Apprentice

  • Members
  • PipPip
  • 75 posts
just had the exact same problem...

the solution worked for me...

thing to note... make sure u use the string from settings.inc.php

becareful of the quotes... i am using phpmyadmin to make the changes to the sql databases... first few failures because of the quotes... the failure was the double quotes... i change them to single quotes and viola~~~

UPDATE ps_employee SET passwd=md5('ZPqWqUahBDb6JMkpsKfBQazLvO8LJutidghx3Jrpps2vC0R8aX1JA8Ep123456789') WHERE email='abc@yahoo.com'

clear the password in the DB first... that way when it works the password field will be updated... hope this helps...

alfred
----------------------------------------
http://www.zuigeling.com
http://www.iputa.com
http://www.alfredtay.com
----------------------------------------

#18
rossdavidh

    PrestaShop Apprentice

  • Members
  • PipPip
  • 49 posts
Thanks to those who posted this, it helped me out a lot.

Just an additional thought: from the mysql command line, you can use these commands:

use prestashop; (or whatever you called your database)
select * from ps_employee;

(then use the sql command discussed above to change your password)
then again do:

select * from ps_employee;

compare the two times you listed ps_employee, and although the password is scrambled you can at least tell that it changed. This can be helpful to point out to you that, for example, you have a typo in your email account, and that's why you're not able to fix the problem.

Just theoretically speaking. :)

#19
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts
If you can access the db there is no need to run the MySQL query.

Just edit that table and get you cookie key from your setting.inc.php and then add the new password behind it.
No need in changing the e-mail address.

If that table is not found then you do need to run the MySQL query.
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#20
sperio

    PrestaShop Apprentice

  • Members
  • PipPip
  • 75 posts
another thing to make sure is that the ACTIVE KEY is 1 and not 0...

why does the password for admin fail every so often? mine just failed again...

cannot edit direct from sql key as the password is shown excrypted... can only insert through the sql query
----------------------------------------
http://www.zuigeling.com
http://www.iputa.com
http://www.alfredtay.com
----------------------------------------