Jun 29, 2017

Magento2 - Resetting admin password.

Reseting password could get 3 possible way.

1. Run command in your server console.

MAGENTO_DIR/bin/magento admin:user:create \
--admin-user="ADMINUSERNAME" \
--admin-password="NEWPASSWORD" \
--admin-email="admin@example.com" \
--admin-firstname="Admin" --admin-lastname="Admin"

2. If you dont have access to the server, you could try updating via your database server.

UPDATE admin_user 
SET password = CONCAT(SHA2('xxxxxxxYourNewPassword', 256), ':xxxxxxx:1') 
WHERE username = 'admin';
NOTE: xxxxxx character sequence is a cryptographic salt.
it is saved in app\etc\env.php file
<?php
return array (
  ...
  'crypt' => 
  array (
    'key' => '525701df74e6cba74d5e9a1bb3d935ad', //cryptographic salt
  ),
  ...

3. Use the Forgot Password.

Post a Comment