3

Recently I installed Sitecore 9.0 version in my system and after successful installation I tried with Sitecore default credentials (admin/b) but it was not working.

But I remember that during Sitecore training the tutor taught me that the default one is "admin/b"

This doesn't seem to work on Sitecore 9.

Is there any way to configure the password during installation?

5
  • 2
    Correct, the default password is not "b" as you state. The "SIF-Default" tells the script to generate a new password. Once the installation is complete, the output log file tells you the Sitecore Admin password. I would imagine the password was changed to be more secure and avoid accidentally going to production with "b" as the password. Feb 11 '19 at 2:45
  • @MichaelWest, Thanks for the clarification. So sitecore default password is not "b" anymore
    – BV Winoya
    Feb 11 '19 at 3:14
  • Correct. The default password is either auto-generated or whatever you make it in the SIF configuration used when installing Sitecore. Feb 11 '19 at 3:16
  • Okay, Thank you so much for your clarification, @MichaelWest
    – BV Winoya
    Feb 11 '19 at 3:35
  • 1
    The default password for Sitecore 9.0 is still admin/b. The default password for Sitecore 9.1 is as Michael West states, set in the SIF script.
    – jammykam
    Feb 11 '19 at 13:43
7

When installing Sitecore 9 (using SIF) you execute a powershell script called XP0-SingleDeveloper.ps1 (at least for installing a Single On Premises instance). In this file you should find a line that looks like this:

$SitecoreAdminPassword = "SIF-Default"

That line determines the password used for the admin user. Change this to whatever you want, and after the installation is completed you can log on as admin using that password (you can even set the password to "b" if you want to).

As per the installation documentation:

[...] edit the XP0-SingleDeveloper.ps1 script and update each line with the settings that are appropriate for your environment. One of the settings that you must edit is SitecoreAdminPassword.

If you do not specify the Sitecore administrator password in the script and leave the example value "SIF-Default" unchanged, a random password is generated for you. This password is written to the XP0-SingleDeveloper.log file – search for Sitecore Admin Password – and displayed when the sitecore-xp0.json file has been processed

0

There is a SetSitecoreAdminPassword.sql file is available in installation zip file. This sql script talks about admin password generation. Please check the below

declare @ApplicationName nvarchar(256) = 'sitecore' declare @UserName nvarchar(256) = 'sitecore\admin' declare @Password nvarchar(128) = 'PlaceHolderForPassword' declare @HashAlgorithm nvarchar(10) = 'SHA1' declare @PasswordFormat int = 1 -- Hashed declare @CurrentTimeUtc datetime = SYSUTCDATETIME() declare @Salt varbinary(16) = 0x declare @HashedPassword varbinary(20) declare @EncodedHash nvarchar(128) declare @EncodedSalt nvarchar(128)

-- Generate random salt while len(@Salt) < 16 begin set @Salt = (@Salt + cast(cast(floor(rand() * 256) as tinyint) as binary(1))) end

-- Hash password set @HashedPassword = HASHBYTES(@HashAlgorithm, @Salt + cast(@Password as varbinary(128)));

-- Convert hash and salt to BASE64 select @EncodedHash = cast(N'' as xml).value( 'xs:base64Binary(xs:hexBinary(sql:column("bin")))' , 'varchar(max)' ) from (select @HashedPassword as [bin] ) T

select @EncodedSalt = cast(N'' as xml).value( 'xs:base64Binary(xs:hexBinary(sql:column("bin")))' , 'VARCHAR(MAX)' ) from (select @Salt as [bin] ) T

1
  • After successful installation, you will be able to find credentials in log file
    – Amit Kumar
    Feb 11 '19 at 19:23

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.