1

I tried to install magento CE- v2.3.1, from the windows command line interface. Instead of full command i used the short one, as "magento setup:install "

I did not provide the full arguments because it was not taking the full command, gives the error every-time.

Next when i tried above command, Magento installed successfully. But now i am not able to login into the Admin panel. as the message appears there is :

The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.

I want to know what will be the solution of this one as i am unable to log into the admin panel? Can magento make admin username and password automatically, if not provided to? how could i get rid from this issue or i will have to reinstall magento?

Note: I made the database there in the DB through the phpmyadmin, but there wasn't any data stored about the admin. kindly help me.

0

First of all, Magento 2 doesn't support Windows OS properly. So, in case of using Windows, we have other options: using Virtual Machine (Vagrant), Docker.

The second thing, avoid using localhost as Top Level Domain. We need to change it.

Third, Magento provides a command to create a new admin account:

$php bin/magento admin:user:create --admin-user="admin" --admin-password="123123q" --admin-email="admin@example.com" --admin-firstname="Admin" --admin-lastname="Admin"

https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-admin.html

0

You can also create a new admin user with all roles by executing this query in your database. Replace the required entry like name,password according to you

Create a new admin user with all the roles

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,created,lognum,reload_acl_flag,is_active,extra,rp_token_created_at) 
VALUES ('Firstname','Lastname','email@example.com','myuser',@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;
  • hm, this is a bit heavy and wrong way. dont do this. better to use magento cli, or even download n98-magerun2 – MagenX May 17 at 16:44
0

1. I want to know what will be the solution of this one as I am unable to log into the admin panel?

You can consider creating new admin credentials using the below command

php bin/magento admin:user:create --admin-user="admin" --admin-password="yourpassword" --admin-email="youremail" --admin-firstname="firstname" --admin-lastname="lastname"

2. Can Magento make admin username and password automatically, if not provided to?

No, Magento won't automatically create admin username and password. We have to provide it at the time of installation. If you can't log in with the credentials which you have given at the time of installation, please create a new admin username and password as per the answer of the 1st question.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.