system7 Posted April 15, 2010 Share Posted April 15, 2010 I tried to do this following the instructions here and it kept on failing. I have run into this problem before with a CMS that I created on my own.I have noticed that when you try and run an md5 through MySQL the result sometimes be different than if you do it via PHP, although you won't notice anything besides failed login attempts with the new password. I think what really happens is that the syntax gets messed up or there are errors between copying and pasting / extra white space characters (ie. there is either a leading or trailing space that you may not notice). By the very nature of running a hash the values should be the same from SQL or PHP, it shouldn't matter.So after screwing around trying to do it with SQL I went ahead and created a simple PHP script to create the correct hash and it worked.See attached file for the script... follow the commented instructions.Good Luck! prestashop_pword_hash.php 6 Link to comment Share on other sites More sharing options...
pjssms Posted October 6, 2010 Share Posted October 6, 2010 I found this somewehre else and it worked. UPDATE `ps_employee` SET `passwd` = MD5('<_COOKIE_>password') WHERE `ps_employee`.`id_employee` = 1; Where cookie is from config file and password is the password you want. 3 1 Link to comment Share on other sites More sharing options...
dkfranc Posted July 26, 2011 Share Posted July 26, 2011 The attached file worked perfect. Just follow the instructions given. Thanks a lot Link to comment Share on other sites More sharing options...
RemiB Posted September 24, 2011 Share Posted September 24, 2011 It worked perfectly for me! Thanks! I found this somewehre else and it worked. UPDATE `ps_employee` SET `passwd` = MD5('<_COOKIE_>password') WHERE `ps_employee`.`id_employee` = 1; Where cookie is from config file and password is the password you want. 1 Link to comment Share on other sites More sharing options...
skipperfoto Posted October 29, 2011 Share Posted October 29, 2011 THANK YOU!!!!! it works like a charm! Link to comment Share on other sites More sharing options...
bluswall267 Posted January 26, 2012 Share Posted January 26, 2012 I too have lost the password to the admin page. I read the replies but they are too advanced for me. I what is PHPMYADMIN and where can I find it? My question is this: How do I find or reset the address to go to my admin page? I would be grateful for any help Link to comment Share on other sites More sharing options...
Pippo3000 Posted February 14, 2012 Share Posted February 14, 2012 I found this somewehre else and it worked. UPDATE `ps_employee` SET `passwd` = MD5('<_COOKIE_>password') WHERE `ps_employee`.`id_employee` = 1; Where cookie is from config file and password is the password you want. worked also for me. thanks 1 Link to comment Share on other sites More sharing options...
aletomsic Posted March 12, 2012 Share Posted March 12, 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...
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...
rnravi Posted September 4, 2012 Share Posted September 4, 2012 Awesome.. works like a charm..!! Thanks a lot Link to comment Share on other sites More sharing options...
vekia Posted September 4, 2012 Share Posted September 4, 2012 http://mypresta.eu/en/art/security/reset-prestashop-admin-password.html here is a step by step tutorial, how to reset prestashop admin password Link to comment Share on other sites More sharing options...
Penuel Posted August 17, 2013 Share Posted August 17, 2013 Somewhere in the post it is written that I found this somewehre else and it worked. UPDATE `ps_employee` SET `passwd` = MD5('<_COOKIE_>password') WHERE `ps_employee`.`id_employee` = 1; Where cookie is from config file and password is the password you want. For me the following worked UPDATE `ps_employee` SET `passwd` = MD5('<_COOKIE_KEY_>mypassword') WHERE `ps_employee`.`id_employee` = 1; Here _COOKIE_KEY_ could be found in config/settings.inc.php. I am working on version 1.5.x, I didn't find COOKIE var in config.php probably in older versions it was there? But for 1.5.x you should probably find in settings.inc.php Thanks http://www.regur.net Link to comment Share on other sites More sharing options...
Sickboards Posted December 8, 2013 Share Posted December 8, 2013 Thanks!! Link to comment Share on other sites More sharing options...
vekia Posted December 8, 2013 Share Posted December 8, 2013 for everyone with similar problem: new easy way to reset prestashop admin password Link to comment Share on other sites More sharing options...
Y Talansky Posted March 7, 2014 Share Posted March 7, 2014 just wanted to point out because it took me some time ... in --> UPDATE `ps_employee` SET `passwd` = MD5('<_COOKIE_KEY_>mypassword') WHERE `ps_employee`.`id_employee` = 1; totally replace <_COOKIE_KEY_> with _COOKIE_KEY_ value found in config/settings.inc.php and put in what ever password you want instead of mypassword. also take not that this is for id_employee` = 1 so you need to log in with the email address of employee 1 Link to comment Share on other sites More sharing options...
khodari Posted May 2, 2014 Share Posted May 2, 2014 tried this: UPDATE `ps_employee` SET `passwd` = MD5(1qUaR5hfmNyjwKFrIBXo95CfSBQt8QMUmYkdAifzXaV9cqqH3UPhMuxq'rohit') WHERE `ps_employee`.`id_employee` = 2; Got this: SQL query: UPDATE `ps_employee` SET `passwd` = MD5( 1qUaR5hfmNyjwKFrIBXo95CfSBQt8QMUmYkdAifzXaV9cqqH3UPhMuxq 'rohit' ) WHERE `ps_employee`.`id_employee` =2 MySQL said: #1583 - Incorrect parameters in the call to native function 'MD5' Link to comment Share on other sites More sharing options...
Y Talansky Posted May 2, 2014 Share Posted May 2, 2014 I think your missing a ' before and after the md5 string see example above also note you used employee 2 make sure to log in to that employee Link to comment Share on other sites More sharing options...
paramaguru Posted September 10, 2014 Share Posted September 10, 2014 Thanks it worked perfectly for me Link to comment Share on other sites More sharing options...
janilson Posted September 28, 2014 Share Posted September 28, 2014 This will work!!!!!!!!!!! UPDATE `lj_customer` SET `passwd` = MD5('bqvhzjddkdswedrfgj2dfregtrbman92lppwshhr8ziybujhycwjgmolnewpassword') WHERE `lj_customer`.`id_customer` = 3; Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2014 Share Posted September 28, 2014 bqvhzjddkdswedrfgj2dfregtrbman92lppwshhr8ziybujhycwjgmo this is your cookie key? Link to comment Share on other sites More sharing options...
janilson Posted September 28, 2014 Share Posted September 28, 2014 To vekia: Yes this is my cookie key! I just change character 4 my security...! Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2014 Share Posted September 28, 2014 thank you for explanation :-) yea, for everyone with question marks in head what is cookie key open /config/settings.inc.php file there is declaration of constant COOKIE_KEY and it's value is a cookie key to include to query janilson proposed to use Link to comment Share on other sites More sharing options...
dalbornoz Posted December 9, 2014 Share Posted December 9, 2014 Vekia, you offer a work around to reset a password. Is there any development to actually fix the "lost password" bug. So it will work correctly. Link to comment Share on other sites More sharing options...
oliiix Posted July 14, 2017 Share Posted July 14, 2017 Just create a normal account (client account) via the frontend of the shop. go to the mysql database, copy the password of the new created client account from ps_customer to your employee account row in ps_employee and your good to go =) Link to comment Share on other sites More sharing options...
Mercader Virtual Posted March 10, 2019 Share Posted March 10, 2019 Can somebody update the solution for the latest prestashop 1.7.4.2 version? MD5(cookie key + password) solution seems to be deprecated. Link to comment Share on other sites More sharing options...
Mercader Virtual Posted March 28, 2019 Share Posted March 28, 2019 (edited) The new way (probably starting from 1.7.4) uses Bcrypt. You can generate the password here:https://passwordhashing.com/BCrypt And then copy the cypher text directly to employees.passwd As simple as that. No need to concatenate the cookie key anymore. This is how Laravel handles it and probably the best practice nowadays. Edited March 28, 2019 by Mercader Virtual (see edit history) 2 Link to comment Share on other sites More sharing options...
zapalm Posted April 13, 2019 Share Posted April 13, 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...
Mercader Virtual Posted April 23, 2019 Share Posted April 23, 2019 2 hours ago, KILIYATSIA said: lost the password to the admin page. I read the replies but they are too advanced for me. I what is PHPMYADMIN and where can I find it? My question is this: How do I find or reset the address to go to my admin page? I would be grateful for any help Which prestashop version? Link to comment Share on other sites More sharing options...
zapalm Posted April 23, 2019 Share Posted April 23, 2019 4 hours ago, KILIYATSIA said: I read the replies but they are too advanced for me. 🤦🏻♂️ Did you followed my link for the password recovery tool? Link to comment Share on other sites More sharing options...
SmartDataSoft Posted January 7, 2022 Share Posted January 7, 2022 (edited) Hello, we made a details video on this issue It may help any one If any one need here is a details article https://classydevs.com/prestashop-admin-login-problem/ Thank you from @ClassyDevs Edited January 7, 2022 by SmartDataSoft (see edit history) 1 Link to comment Share on other sites More sharing options...
Ali Samie Posted March 25, 2022 Share Posted March 25, 2022 On 1/7/2022 at 5:15 PM, SmartDataSoft said: Hello, we made a details video on this issue It may help any one If any one need here is a details article https://classydevs.com/prestashop-admin-login-problem/ Thank you from @ClassyDevs thanks for details. it helped me solve problem for my client Link to comment Share on other sites More sharing options...
mehnoor Posted September 7, 2022 Share Posted September 7, 2022 (edited) Hello All, I had lost my password too, I am using a local host. What I did was: (solutions) 1. I open classes/employee.php 2. add line 329 : echo $crypto->hash($plaintextPassword); exit; 3. Go on the browser Put your email and password, don't click login 4. right click, choose inspect, choose responses, and copy the data in responses 5. Paste it in PHPMyAdmin, [your database name]/ps_employee in passwd, and press enter to save 6. Now go on browser and click on the login 7. Works like magic ~Mehnoor Edited September 7, 2022 by endriu107 (see edit history) 1 Link to comment Share on other sites More sharing options...
ClassyDevs Posted September 8, 2022 Share Posted September 8, 2022 Hello @mehnoor 's solution is great. I can make it simpler for you. Start from number 5 and paste the below text on the password field of your [your database name]/[DB_PREFIX]employee table $2y$10$Z2y3bYcBksYiGkYReov8Iu/xZ6oJJmRtdsoJ5DK7NjniF1rfg9Ukm The above encoded code represents password: 123456789 Log in and then you will be able to change the password. Regards ClassyDevs 1 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