after installing magento in my local machine I for

2019-03-08 15:06发布

after installing magento in my local machine I forgot admin password what I have given. I am not able to login to my admin area how can I reset the password

I have read this article http://www.atwix.com/magento/reset-admin-password-mysql/ but it is not working for me. Or may be I am not getting this

please help me am a beginner of Magento

15条回答
走好不送
2楼-- · 2019-03-08 16:05

Poking around in the database is a horrible idea, when you've got an entire framework at your fingertips. This is the proper way of changing the admin password:

Create a file called reset-password.php and place it in the site root:

<?php

chdir(dirname(__FILE__));
require 'app/Mage.php';
Mage::app('admin')->setUseSessionInUrl(false);
umask(0);

$user = Mage::getModel('admin/user')
    ->load('admin', 'username')
    ->setNewPassword('mynewpassword')
    ->save();

Make a request for /reset-password.php in your browser, and the Magento framework should update the password for admin to mynewpassword.

查看更多
萌系小妹纸
3楼-- · 2019-03-08 16:05
<?php
$pass = "12345678";
  $salt = "EI";
  echo md5($salt.$pass).":".$salt;
?>
Update 'admin_user' table password field with the output of above program.

Follow below link for more information...
[http://www.atwix.com/magento/reset-admin-password-mysql][1]
查看更多
迷人小祖宗
4楼-- · 2019-03-08 16:05

$date = new DateTime();

$password = "b919ec4a25be3bc46c00895a0eb4f907:c20ad4d76fe97759aa27a0c99bff6710";

$sql = "UPDATE yourmagentoDB.admin_user SET password = \'".password."\', rp_token_created_at = ". $date->getTimestamp() ." WHERE admin_user.user_id = ".$user_id;

For example, your password is: frank123. Think of of any string of at least two bits. In my case i will take my new password to be “frank123” and salt to be “MD5(12)”. Next go to any md5 generator site and generate md5 of string “c20ad4d76fe97759aa27a0c99bff6710frank123”. The md5 in my case being “b919ec4a25be3bc46c00895a0eb4f907″. Now, edit the table row with the above script.

see how to use FTP below

http://excellencemagentoblog.com/how-to-reset-magento-admin-passwor

查看更多
登录 后发表回答