ultraplano Posted August 25, 2008 Share Posted August 25, 2008 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_oublieBasically, 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 More sharing options...
Madrilene Posted August 28, 2008 Share Posted August 28, 2008 Hello Pedrovery nice of you of posting a solutionCan 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 Link to comment Share on other sites More sharing options...
target_locked Posted August 29, 2008 Share Posted August 29, 2008 I got this error:It seems that MySQL does not understand the word MD5 !!!Any advice ?Thanks. ErrorSQL 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 More sharing options...
Madrilene Posted August 29, 2008 Share Posted August 29, 2008 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.... Link to comment Share on other sites More sharing options...
spirit Posted August 29, 2008 Share Posted August 29, 2008 I don't think it's a problem with spaces. Maybe you need quotes around your md5 call as paswd is probably a varchar Link to comment Share on other sites More sharing options...
ultraplano Posted August 29, 2008 Author Share Posted August 29, 2008 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_employeeCOOKIE_KEY = hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiNEWPASS = prestashopYOUREMAIL = [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 More sharing options...
ultraplano Posted August 29, 2008 Author Share Posted August 29, 2008 Hello Pedrovery nice of you of posting a solutionCan 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 More sharing options...
target_locked Posted August 29, 2008 Share Posted August 29, 2008 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_employeeCOOKIE_KEY = hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIiNEWPASS = prestashopYOUREMAIL = [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 More sharing options...
ultraplano Posted August 29, 2008 Author Share Posted August 29, 2008 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 passI'll try to provide the right sql and explain it. Link to comment Share on other sites More sharing options...
target_locked Posted August 31, 2008 Share Posted August 31, 2008 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 passI'll try to provide the right sql and explain it. Hi ultraplano,Assume that the data as follows:EMPLOYEE TABLE NAME: ps_employeeCOOKIE_KEY: 'hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi'New pass: 123456789Email: [email protected]Pls generate the SQL string and explain some about it.Thanks. Link to comment Share on other sites More sharing options...
ultraplano Posted August 31, 2008 Author Share Posted August 31, 2008 The SQL should be like this: UPDATE ps_employee SET passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi123456789") WHERE email="[email protected]" The MD5 string is composed by the COOKIE_KEY and the PASSWORD, all together.Did it work? Link to comment Share on other sites More sharing options...
target_locked Posted September 2, 2008 Share Posted September 2, 2008 The SQL should be like this: UPDATE ps_employee SET passwd=md5("hgI3M9S1Uv45wDqkqvGNYF.xAamJY9.zKpykqHCgCxE5m1ozAtQBjFIi123456789") WHERE email="[email protected]" The MD5 string is composed by the COOKIE_KEY and the PASSWORD, all together.Did it work? ultraplano,Thank you very much. It worked. Link to comment Share on other sites More sharing options...
chopi321 Posted October 5, 2008 Share Posted October 5, 2008 Guys... it didnt work for me,..I still can`t login to the admin page...please a little help...Thanks. Link to comment Share on other sites More sharing options...
ejectcore Posted October 5, 2008 Share Posted October 5, 2008 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 caseMake sure you have the www. in front of your domainhttp://www.domain.co.uk/youradmin Link to comment Share on other sites More sharing options...
chopi321 Posted October 5, 2008 Share Posted October 5, 2008 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 caseMake sure you have the www. in front of your domainhttp://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 More sharing options...
godzookee Posted November 7, 2008 Share Posted November 7, 2008 Thank you for the advice that worked perfectly for me.Thanks again for all the help people here provide.Regards Link to comment Share on other sites More sharing options...
sperio Posted January 26, 2009 Share Posted January 26, 2009 just had the exact same problem...the solution worked for me...thing to note... make sure u use the string from settings.inc.phpbecareful 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 More sharing options...
rossdavidh Posted February 15, 2009 Share Posted February 15, 2009 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 More sharing options...
TropischBruin Posted February 15, 2009 Share Posted February 15, 2009 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. Link to comment Share on other sites More sharing options...
sperio Posted February 16, 2009 Share Posted February 16, 2009 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 More sharing options...
strs156 Posted February 16, 2009 Share Posted February 16, 2009 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 More sharing options...
Oliven Posted March 28, 2009 Share Posted March 28, 2009 Great, It is very useful. Thanks Link to comment Share on other sites More sharing options...
Heng Posted September 9, 2009 Share Posted September 9, 2009 Hi guys,I also had the same problem after installation.Still failed to login after trying as below:define('_COOKIE_KEY_', 'DxWs7QhOT4xSgSqzy9vJhEXbGgSyOunpREc6sSZWn5tspomUCQdVQKJw');table: ps_employeenew password: 123456789email: [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 passwordAttached the database format, would be appreciate if can guide me to solve the problem Thanks Link to comment Share on other sites More sharing options...
jeaniel Posted December 1, 2009 Share Posted December 1, 2009 Oh wow. Thank you. I'm so glad you made this thread. Don't have the time to make one and wait for replies.Regards,JeanielOrdinateur portable pas cher Link to comment Share on other sites More sharing options...
Ninja Posted January 5, 2010 Share Posted January 5, 2010 hi... i did tried all these but still cant login to my prestashop i dont know whats wrong!it still gives me employee not exist! Link to comment Share on other sites More sharing options...
rossdavidh Posted January 6, 2010 Share Posted January 6, 2010 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 login2) 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/paste3) 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 oneGood luck! Link to comment Share on other sites More sharing options...
Ninja Posted January 6, 2010 Share Posted January 6, 2010 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 123456789define('_DB_NAME_', 'qsutecom_nice');can you type it for me because i am feeling crazy about this! Link to comment Share on other sites More sharing options...
rossdavidh Posted January 8, 2010 Share Posted January 8, 2010 when I did it, the key and password were typed in sequentially, like:'dsfjkdsfsjdfjkdsfsjdsfjkfdmypassword', where dsfjkdsfsjdfjkdsfsjdsfjkfd was the key and mypassword was my password Link to comment Share on other sites More sharing options...
system7 Posted April 15, 2010 Share Posted April 15, 2010 I wrote up a working solution for this problem, you can find it under this thread:http://www.prestashop.com/forums/viewthread/51589/installing_prestashop/forgotten__lost_password__manual_reset_via_phpmyadmin/I found that there is a problem when you run the md5 hash through SQL rather than PHP... more is explained in my thread. Link to comment Share on other sites More sharing options...
VIXUS Posted April 30, 2010 Share Posted April 30, 2010 I just copied entire shop from my site to local WAMP for some testing and updates and this saved me!Thanx to you ultraplano... saved me a lot of time!!! :-) Link to comment Share on other sites More sharing options...
omer_saeed21 Posted July 22, 2010 Share Posted July 22, 2010 hi guys i know is to late to ask but i just install the software and have the same problem and i did all the steps you mentuioned but it gave this error MSG#1305 - FUNCTION afrahype_AFRADB.md5 does not existAny advice thanx Link to comment Share on other sites More sharing options...
aletomsic Posted March 13, 2012 Share Posted March 13, 2012 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 More sharing options...
zapalm Posted January 15, 2019 Share Posted January 15, 2019 Guys, there is the excellent solution without requiring knowledge about database and programming! See my answer on another topic. Link to comment Share on other sites More sharing options...
zapalm Posted January 15, 2019 Share Posted January 15, 2019 🤦🏻♂️ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now