Reset admin password in prestashop
45If you’re like me and you tried the “lost password” link on prestashop’s backend and never received the email, you might try this solution if you have access to the database. Look in config/settings.inc.php for the _COOKIE_KEY_ value as you’ll need that. Run the following SQL and replace the <> variables with your information.
UPDATE employee SET passwd = md5(“<_COOKIE_KEY_ value><yourNewPassword>”) WHERE email = “youremailaddress”;
hope that helps
Hi I'm Nick Bartlett and thanks for visiting my blog. I'm not much of a writer; many of my posts are short and to the point while others are meant to be a reference for myself and other web developers.
sir….your tips didn’t work for me. do you have another tips for me to reset my password for localhost installation….please help me. Thanks
Thanks so much, this worked great!
With a few modifications this worked for me
UPDATE ps_employee SET passwd = md5(‘Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin’) WHERE email =’my@email.com’
The new password being “admin” which can be seen at the very end of the md5 checksum… Notice that single quotes are used instead of double quotes as in the first example…
Thank .. Soooo much for your useful PASSWORD SURVIVAL tip. Great
and I wana tell Citra Pls.. Don’t copy ..
md5(’Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin’) WHERE email =’my@email.com’
and change only cookies and email,You must change all symbol ( ‘ ) in SQL statement before execute your SQL code too. It’s should work great…Thank again.
With the modification made by xile it worked. Thanx !
it’s work!
Many thanks and Happy New Year !
Excellent solution! I have been looking for other solutions but this is the best!
Thanks!
well i do not understand where to put the sentences you mentioned.
I allready see a cookiekey in settings.inc. I also seen by DB password.
Should i put the words at the end?
please let me know
it worked for me when i was do that:
UPDATE ps_employee SET passwd = md5(“Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin”) WHERE email =”my@mail”
(change of coarse the MD5 and the admin at the end to your settings)
thanks man! you saved me!
Brilliant! I didnt realise that it needed the encyption key from the config.
Worked a like a charm!
Thanks Nick!
Men, you saved my life.
All the best from Barcelona (Spain)
thanks so much!!!!!!!!!!!!!
The other way to change the password that works is:
1) Register yourself on your store with the password that you want to be the admin password.
2) Goto PhpMyAdmin >> Customer >> copy the password key from user ID you just registered.
3) Goto PhpMyAdmin >> Employee >> paste the copied key on the password column of your admin ID.
Ofcourse these are encrypted so you should not change anything while you copy paste.
Thats it
This trick works on most of the online softwares
all the best!
thanks so much!!!!!!!!!!!!!
cool dude it works
Worked great, thanks a lot, you solved my last 20min headache
Thakssss!!!!!
copy paste rules….
The Best and Easiest Way,
Thank you
Yes mate , this worked perfectly .
What a nice tip .
100%
Thanks a million . i was 2 seconds from deleting prestashop
Awesome tip!!!! worked nice and easy, good job!
Thanks a lot! It really works!
bosss.. that was truly awesome..saved me alooot…. When in Kenya, Tusker on me!!
The best and easiest solution. Its again proved that complex problems need not have complex solutions.
thank, its work great
Thank you for tip
Thanks a lot, very useful tip.
Thanks again dude,
Thanks man!
Thanks man, you saved me
thanks
Wow wow wow!!! absolutely mind blowing!!!! Great Job…u saved me a lot.
Mahmud
Yeah, i tried a lot but copy is the dimpliest way. Thanks!
You can try loggind in to the database and look for the table named ex. “ps_employee” without quotes and view it in some interface, in my case I used phpMyAdmin.
Then, you can see your password encrypted in md5, so using Google for example, if you cannot encode yourself with other methods, you can use an online md5 encoder for example to make your new password “test” usable untill you can log in as administrator and cheange it to the one you wish.
Using this kind of encoder I made the password “test” to look like this “098f6bcd4621d373cade4e832627b4f6″. You can use this one to login as password untill you change it.
Good luck!
I cant make it work!, it doesnt work even bu running
UPDATE ps_employee SET passwd = md5(Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin’) where email = ‘pablob@domain.com’
also tried other passwords by copying password from a customer account, and didnt work. Even I tried with other employee account and i cant login, always get
Error: employee does not exist, or bad password
The smtp also seems not to be configured properly, and i cant get in to configure. Any help will be appreciated.
Thanks
Sorry, but i didnt mention that now it seems to work, but it redirects to the login page, without any “employee does not exist, or bad password” error. What could that be the problem?
Thank you Xile!
It worked….
Strange, why they are using MD5 instead of SHA1 ? MD5 is so deprecated now …
Thank you for the php instructions – but im stuck on part 2. ” Goto PhpMyAdmin >> Employee >> paste the copied key on the password column of your admin ID.”
I can not figure out where to go for this. If anyone can send me a little more detail I would truly appreciate it!
can’t find it either. Is everyone here a genius or am I just stupid? Can’t find the files ‘customer’ and ‘employee’, and I don’t understand anything of the first explanation of nick. What do you do when you ‘run an sql’? Please give some explanation for dummies, I really need it!!
I love you! Worked a treat!
please help me! I have prestashop installed locally, lost the admin password, but I really know NOTHING at all about sqls and stuff.
Is there anyone who can explain step by step:
1 which files I should open?
2 where these files are located (my files are on D:/xampp/… and where do I look then?)
3 which text I need to delete and which text I need to replace it with?
Please!!!
Hi all,
I was trying to change the db pass for like 20 mins, when it hit me.
For those that the SQL produces an error, just retype the double quotes and the query will execute just fine. The problem is that when you copy paste the query from here, directly to phpmyadmin, the double quotes are not recognized by it and it produces an error.
Hi!
Great help, allso got stuck on the double quotes, retyped and now it all OK!
hi
thanks a lot for suggestion it works for me .
and now i am continuing my website.
You can change email address of the user and then click on the forgot passord link so that prestashop can generate new password.
I got this error when I did this and logged into the back office:
Fatal error (Employee -> id_lang is empty) and nothing but that error and a white screen. Any ideas?
thanks its works fine