I’ve experienced an issue setting up the Lighthouse Demo and the Play Summit demo in recent weeks. Once I get through all the normal issues of setting up a new environment, I can’t log into Sitecore. I know I passed “b” to the init script, but alas, I get an invalid username and password error.
I’ve gotten around it by resetting the password in the database. Since the database is running in containers, This isn’t as straight forward as it seems. Connecting to your SQL instance in containers is covered well by Neil Killan on his blog post on “Querying your Sitecore SQL Container“, but for convenience you need to run the following command, specifying the id of your sql container.
>docker inspect container [containerID]
Where container id is the id for your container. You can easily copy the ID right from docker desktop by clicking the copy icon next to the ID.
Once you run that you will find the IP in the network section
Copy that, and then look up the SQL sa password in the env file in the root of your solution.
That will allow you to login using the “sa” account into SQL Management studio.
Once there, you can reset the password on the admin account by running a query in the core database. After googling for that query, you’ll most likely end up on this stack overflow article.
I think the higher ranked answers are for older versions of sitecore, but I found the answer by Dan Sinclair works for the Sitecore 10 instances these demo sites use. For convenience here is the query:
UPDATE[aspnet_Membership]
SET[Password]=’K8N8GUW8UiNT2mPdjvuBDH+QmvA3R61M9buVvCwFHwtDjpMzTxs34lg0uQ0azCITqh6FkUZlX4kM72lsAyuyXQ==’,
[PasswordSalt]=’p5B6HOWKt0ctMZaSNXTlfw==’,
[IsApproved] =’1′,
[IsLockedOut] =’0’WHEREUserId IN(
SELECTUserId FROMdbo.aspnet_Users WHEREUserName =’sitecoreadmin’);
After running that, the account should be good to login with good old password “b”
Leave A Comment