You can create or edit a Magento 2 admin user account using the command line.
For that, you have to open the terminal/command prompt.
After that go to your Magento site’s root directory in the terminal, for example, your Magento site can be in a folder/directory path as /var/www/html.
So go to that directory from the command line and after that execute the below command.
php bin/magento admin:user:create --admin-user='new-user' --admin-password='admin123' --admin-email='[email protected]' --admin-firstname='Admin' --admin-lastname='Admin'
Once the Magento 2 admin user account is created then you will see the below success message.
–admin-user-> Admin account username (required).
–admin-password-> Admin User account password (required).
–admin-email-> Admin user account’s email address (required).
–admin-firstname-> Admin user’s first name (required).
–admin-lastname-> Admin user’s last name (required).
Note: If you are editing an existing user then only the first name, last name, and password can be edited.
Hope it will help you. Thank you.
PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /root/proxy/magento2/magento2/vendor/magento/framework/Filesystem/Directory/Write.php on line 35