Magento Expert Forum - Improve your Magento experience

Results 1 to 4 of 4

Admin Login - Access Denied

  1. #1

  2. #2
    Junior Member
    Join Date
    Jun 2016
    Location
    Bhavnagar, Gujarat, India
    Posts
    1,125
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    You need to follow these steps:
    For Magento 1.X:-
    1. Open MySQL
    2. Add new row in admin_user table
    3. Use the ID and password for login

    For Magento 2.X:-
    1. Run following command from Shell
    php bin/magento admin:user:create --admin-user=[data] --admin-password=[data] --admin-email=[data] --admin-firstname=[data] --admin-lastname=[data]
    2. Used the ID and password for login

  3. #3
    Junior Member knowband.plugins's Avatar
    Join Date
    Jul 2016
    Location
    Noida, India
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can create new user using mysql query.

    LOCK TABLES `admin_role` WRITE , `admin_user` WRITE;

    SET @SALT = "rp";
    SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), CONCAT(":", @SALT ));
    SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;

    INSERT INTO `admin_user` (firstname,lastname,email,username,password,create d,lognum,reload_acl_flag,is_active,extra,rp_token_ created_at)
    VALUES ('Firstname','Lastname','[email protected]','myuse r',@PASS,NOW(),0,0,1,@EXTRA,NOW());

    INSERT INTO `admin_role` (parent_id,tree_level,sort_order,role_type,user_id ,role_name)
    VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = 'myuser'),'Firstname');

    UNLOCK TABLES;


    Regards,

    Knowband Plugins | Buy Best Magento Extensions

  4. #4
    New member
    Join Date
    Jan 2017
    Location
    6830 N Eldridge Pkwy
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = 'myuser'),'Firstname');

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •