Jump to content

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


Recommended 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.prestashop.com/forums/viewthread/4830/discussion_generale/resolu_erreur_lors_du_renvoi_du_mot_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

Link to comment
Share on other sites

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


Error
SQL query:

UPDATE ps_employee SET passwd = md5( ’hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi’ ) WHERE email = ’[email protected]

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
Link to comment
Share on other sites

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 = [email protected]

The code for this is:


update ps_employee set passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiprestashop") where email="[email protected]"



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

Hope this helps.

Link to comment
Share on other sites

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=’[email protected]

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="[email protected]"



Try it and tell us if it works.

Link to comment
Share on other sites

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 = [email protected]

The code for this is:


update ps_employee set passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiprestashop") where email="[email protected]"



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:


There is 1 error

1. employee does not exist, or bad password


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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: [email protected]

Pls generate the SQL string and explain some about it.
Thanks.
Link to comment
Share on other sites

  • 1 month later...
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?__---
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

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='[email protected]'

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

alfred

Link to comment
Share on other sites

  • 3 weeks later...

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. :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Thanks A lot for your solution you saved my day.
It worked at once.
I have imported the hole database from my copy home server to the real one ...but...... the admin accounts and got messed up
(i shouldnt export the ps_product and ps_employee tables in the first place and then import em on the real server .

THANK YOU !!!!

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

Hi guys,

I also had the same problem after installation.
Still failed to login after trying as below:
define('_COOKIE_KEY_', 'DxWs7QhOT4xSgSqzy9vJhEXbGgSyOunpREc6sSZWn5tspomUCQdVQKJw');
table: ps_employee
new password: 123456789
email: [email protected]

- Go to database (PHPAdmin)
- click on SQL
- UPDATE ps_employee SET passwd=md5("DxWs7QhOT4xSgSqzy9vJhEXbGgSyOunpREc6sSZWn5tspomUCQdVQKJw123456789") WHERE email="[email protected]"
- click 'GO"
- Click create PHP code
- go to login - http://www.domain.co.uk/youradmin/login
- key in e-mail address: [email protected] & password: 123456789
- Failed to login
- Error message: There is 1 error 1. employee does not exist, or bad password

Attached the database format, would be appreciate if can guide me to solve the problem

Thanks

11604_xyX4aHiV688yLjXN3pws_t

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I've used this a couple times for various reasons. Things to check:

1) you're not misspelling the email address, either in the SQL command or when you attempt to login
2) you're using the correct key. For example, if you're migrating from one server to another the key won't be the same, and if you are hand typing it in the chance of a typo is high so it's better to copy/paste
3) doublecheck after you run the command that the table data actually changed (look at it before and after doing the SQL command and make sure it looks different)
4) make sure you're looking at the right table, for example if you have more than one prestashop database on your server for some reason make sure you're on the right one

Good luck!

Link to comment
Share on other sites

i did run the command by copy paste and its fresh install...

i dont know whats the problem exactly because i did check and copy the command run it several times...did new install several times! something wrong i dont know what!

hash:
define('_COOKIE_KEY_', 'hixm1iabQt4nEmjSN3Mxy9chXLY3tJJR4FsK51Vt2vwCy13pUpNLKNcE');
pass 123456789

define('_DB_NAME_', 'qsutecom_nice');

can you type it for me because i am feeling crazy about this!

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 2 months later...
  • 1 year later...

guys i'm having exactly the same problem, but i can't fix it with the above instructions. i've even tried the php script. i am able to execute the query with no problem, but the login problem remains. any other ideas? this si the sql sintax of my command:

 

UPDATE ps_employee SET passwd=md5('ILGE3SN1jaNM6hErPDYPBWgCBPpOSBYfaxfJsikAcMimaJF5ZwJPhwQz123456789') WHERE `id_employee`=3;

 

it runs successfully but does not solve the problem. i have also tried with 'email' instead of 'id_employee'.

 

please help!

Link to comment
Share on other sites

  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...