cancel
Showing results for 
Search instead for 
Did you mean: 

Insert New User Admin in PhpMyadmin? Magento2

SOLVED

Insert New User Admin in PhpMyadmin? Magento2

How insert new user admin in PhpMyadmin Magento 2

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Insert New User Admin in PhpMyadmin? Magento2

Take a look at admin_user table. Pick one of the users which you want to duplicate, for example "admin" user (it probably have all permissions). Then do INSERT into admin_user table, insert all the values except user_id (which will be auto-generated) and pick username that you want (it cannot be the same as username which already exists).

Once you create such user (let's call it "john"), execute following query to set the password you want:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'john';

For example, if you want to set password to Changeme1, execute following query:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxChangeme1', 256), ':xxxxxxxx:1') WHERE username = 'john';
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

View solution in original post

1 REPLY 1

Re: Insert New User Admin in PhpMyadmin? Magento2

Take a look at admin_user table. Pick one of the users which you want to duplicate, for example "admin" user (it probably have all permissions). Then do INSERT into admin_user table, insert all the values except user_id (which will be auto-generated) and pick username that you want (it cannot be the same as username which already exists).

Once you create such user (let's call it "john"), execute following query to set the password you want:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'john';

For example, if you want to set password to Changeme1, execute following query:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxChangeme1', 256), ':xxxxxxxx:1') WHERE username = 'john';
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue