Question

On Drupal I often log in using drush uli. It opens a one-time login URL in my browser.

Is it possible to log in to the Magento backend with bin/magento?

Was it helpful?

Solution

No, It is not possible currently to log in as an admin using CLI in Magento 2 but you can create a new user like:

php bin/magento admin:user:create --admin-user=mageuser --admin-password=HiMagento123 --admin-email=user@example.com --admin-firstname=John --admin-lastname=Doe

Or you can check the below command for more details:

php bin/magento admin:user:create --help

OTHER TIPS

Natively, I don't think that is possible, you can rather see the admin URI like this : php bin/magento info:adminuri

To see all the available commands, you can execute : php bin/magento or php bin/magento list.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top