Good morning..
I installed magento 2 successfully but I can't connecting to my admin space.
I unlocked my admin with
php bin/magento admin:user:unlock admin
and cleared my cache. But it did not work..
I changed my password using this request:
UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'admin'
It did not work.
I run this request in my terminal in my magento folder
sudo php bin/magento admin:user:create --admin-user="sana" --admin-password="admin@123" –-admin-email="sana@gmail.com" --admin-firstname="admin" --admin-lastname="admin"
I have this error
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command".
Any help please?
Hi @sanaamini,
Using something like this should work.
bin/magento admin:user:create --admin-user="damian" --admin-password="cambiodepassword1" --admin-email="damian@dominio.com.ar" --admin-firstname="Damian" --admin-lastname="Culotta"
Which version (and edition) are you using currently?
Thanks for response
I use the Magento-CE-2.2.1
When I excute the command I have this response
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command".
@sanaaminiHi,
Error you are receiving occurs when CLI is not able to read the commands. For example [--admin-user="..."]. These commands has -- in front of them to differenciate between them.
One of you "-" is culprit and causing you an issue. Possible reason is you copied it from somewhere and "-" is changed to a special character. Just replace all the '-' and run the command should work for you. Let know otherwise.
Problem Solved? Please give 'Kudos' and 'Accept answer as Solution'.
Thank you for the answer,
Yes I remplaced it but I had the same result.
I finally started my installation from the beginning and it succeeds this time..
Thanks a lot