<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NemoPS &#187; backoffice</title>
	<atom:link href="https://nemops.com/tag/backoffice/feed/" rel="self" type="application/rss+xml" />
	<link>https://nemops.com</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Wed, 05 Dec 2018 13:25:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>Recover an unrecoverable Prestashop back office password</title>
		<link>https://nemops.com/recover-prestashop-backoffice-password/</link>
		<comments>https://nemops.com/recover-prestashop-backoffice-password/#comments</comments>
		<pubDate>Mon, 12 Jan 2015 14:06:03 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[backoffice]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2271</guid>
		<description><![CDATA[<p>If you never found your Prestashop back office being unaccessible for no reason, call yourself lucky! But if you did, let&#8217;s see how to recover an unrecoverable password in Prestashop. Compatibility: Prestashop 1.4 (not tested), Prestashop 1.5, Prestashop 1.6 Watch the screencast (text version below) The Fact: The Employee does not exist, or the password [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://nemops.com/recover-prestashop-backoffice-password/">Recover an unrecoverable Prestashop back office password</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you never found your Prestashop back office being unaccessible for no reason, call yourself lucky! But if you did, let&#8217;s see how to recover an unrecoverable password in Prestashop.</p>
<p><span id="more-2271"></span></p>
<ul>
<li>Compatibility: Prestashop 1.4 (not tested), Prestashop 1.5, Prestashop 1.6</li>
</ul>
<h2>Watch the screencast (text version below)</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/EzBC-yYpJ3U#038;feature=youtu.be" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>The Fact: The Employee does not exist, or the password provided is incorrect.</h2>
<p><a href="http://nemops.com/wp-content/uploads/2015/01/password_recover.png"><img src="http://nemops.com/wp-content/uploads/2015/01/password_recover.png" alt="Prestashop wrong back office password" width="553" height="546" class="aligncenter size-full wp-image-2273" /></a></p>
<p>Have you ever tried logging in to your Prestashop back office, just to be presented with a nonsense message as the title above, without apparent reason? I bet. I did, and many other people as well. Then you tried password recovery, and it whether didn&#8217;t work, or you didn&#8217;t get any email. If it worked, once more, you have been lucky.</p>
<p>But if didn&#8217;t work then it&#8217;s absolutely fundamental to regain access to the back office as quickly as possible. Let&#8217;s see how to do it!</p>
<div class="separator"></div>
<h2>Manually regenerating the back office password</h2>
<p>In order to be able to regenerate the back office password you need:</p>
<ul>
<li>Database Access</li>
<li>FTP Access</li>
<li>A free tool to generate an MD5 hash (such as http://www.miraclesalad.com/webtools/md5.php)</li>
</ul>
<p>First off, you should know that Prestashop saves our password as hashed md5 string, where another series of random characters is prepended to the real text. Here is the method taken from <strong>Tools.php</strong>:</p>
<pre class="brush: php; title: ; notranslate">
	public static function encrypt($passwd)
	{
		return md5(_COOKIE_KEY_.$passwd);
	}
</pre>
<p>Now that we know it, we simply need to retriever the _COOKIE_KEY_ and prepend it to our string before generating the hash. Where is it located? In <strong>config/settings.inc.php</strong>:</p>
<pre class="brush: php; title: ; notranslate">
...
define('_MEDIA_SERVER_3_', '');
define('_COOKIE_KEY_', '7oxINWn9ihNci5oODOaJPRJyktpRNZQJjtWXgCOKTvHUmABDcskMQ4Vw');
define('_COOKIE_IV_', 'rXFf5Wc9');
...
</pre>
<p>Grab that, choose a random string and paste it to the md5 generator as shown in the following image, where I am using &#8216;simplepassword&#8217; as password.</p>
<p><a href="http://nemops.com/wp-content/uploads/2015/01/password_recover_hash.png"><img src="http://nemops.com/wp-content/uploads/2015/01/password_recover_hash.png" alt="Prestashop generate a new md5 password" width="767" height="382" class="aligncenter size-full wp-image-2274" /></a></p>
<p>That&#8217;s the hash we need. Copy it, then jump over to your database, <strong>ps_employee</strong> table, and locate the user you are interested in:</p>
<p><a href="http://nemops.com/wp-content/uploads/2015/01/password_recover_db.png"><img src="http://nemops.com/wp-content/uploads/2015/01/password_recover_db.png" alt="Prestashop database - replacing password" width="550" height="127" class="aligncenter size-full wp-image-2275" /></a></p>
<p>Replace the password field, and you&#8217;re done!</p>
<div class="separator"></div>
<h2>Alternative way: creating a password generator file</h2>
<p>Before proceeding be aware that it&#8217;s risky to keep a password-generating file live on your server. Therefore, once used it should be swiftly removed and kept elsewhere.</p>
<p>In your Prestashop installation root, create a file named pwdgen.php, and add the following inside:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/init.php');

if($pass = Tools::getValue('mypass'))
	echo Tools::Encrypt($pass);
</pre>
<p>Add that&#8217;s it! You only need to follow the last step and replace it into the database. But again, make sure you don&#8217;t keep this file live on the server after using it.</p>
<p>The post <a rel="nofollow" href="https://nemops.com/recover-prestashop-backoffice-password/">Recover an unrecoverable Prestashop back office password</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://nemops.com/recover-prestashop-backoffice-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
