after installing magento in my local machine I forgot admin password

后端 未结 15 1519
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 23:20

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

相关标签:
15条回答
  • 2021-01-31 00:00

    This solution work for all versions of Magento.

    Add temporally this at end of index.php

    $user = Mage::getModel('admin/user')->loadByUsername('your_username');
    $user->setPassword('new_password');
    $user->save();
    

    And your new_password was saved. Now remove 3 lines at the end of index.php.

    Have a nice day.

    0 讨论(0)
  • 2021-01-31 00:04

    This would prove to be a good resource to read: http://www.magentocommerce.com/wiki/recover/resetting-admin-password

    SELECT * FROM admin_user;
    

    Then, find the username you want to modify in the listing provided - ‘admin’ in this example. Then, to update the password, type:

    UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';
    

    ‘qX’ would be changed to whatever you want it to be and same goes for ‘password’

    0 讨论(0)
  • 2021-01-31 00:04

    Get List of Users:

    *Note: Add your table prefix before table name.

    SELECT * FROM admin_user; Then, find the username you want to modify in the listing provided - ‘admin’ in this example. Then, to update the password, type:

    UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin'; ‘qX’ would be changed to whatever you want it to be and same goes for ‘password’

    You can also do this in phpMyAdmin, find the admin_user field and choose MD5 when updating password.

    If you want to add a new admin user, you must not only create a new entry in the table ‘admin_user’, but you also have to insert an entry in the table ‘admin_role’ which has to be associated with the user by the field ‘user_id’.

    0 讨论(0)
  • 2021-01-31 00: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.

    0 讨论(0)
  • 2021-01-31 00: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

    0 讨论(0)
  • 2021-01-31 00:05

    Follow the below procedure to reset Magento User Password:

    1) Login to PhpMyAdmin.

    2)Open Magento Database.

    3)Now open "admin_user" table if you not set any table prefix at the time installing Magento, Or if you set table prefix then open "prefixadmin_user" Table.

    4)Now in User password field you can see MD5 Hash converted password. So first you need to convert your plain text into MD5 Hash format and after that copy the MD5 Hast format password and paste it in User Password field under "prefixadmin_user" database table.

    0 讨论(0)
提交回复
热议问题