This question already has an answer here:

I am trying to install Sitecore 9 on my Windows 10 local developer machine runnin SQLExpress 2016. I have to attend developers training soon and for that I need Sitecore 9 running.

For some reason, I cannot pass forward this error. My SQL Express admin password is 2!SiteCore which is strong enough but it keeps complaining that Error: Password validation failed. The password does not meet Windows policy requirements because it is too short.

It has been 24 hours for me and I have searched left right and center. I have tried many different options.

Please help

Thanks

Complete error message:

    Info: Adding database (user id=sc9;data source=.\SQLEXPRESS;initial catalog=sitecore9_MarketingAutomation)
Info: Adding database (MsDeploy.Site/dbFullSql[@path='user id=sc9;data source=.\SQLEXPRESS;initial catalog=sitecore9_MarketingAutomation']/sqlScript)
Info: Opening SQL Connection with connection string 'data source=.\SQLEXPRESS;initial catalog=sitecore9_MarketingAutomation;user id=sc9;pooling=False'. The 'transacted' setting for this connection is 'False'.
Error: Password validation failed. The password does not meet Windows policy requirements because it is too short.
Error count: 1.
Error Code: ERROR_SQL_EXECUTION_FAILURE
More Information: An error occurred during execution of the database script. The error occurred between the following lines of the script: "9" and "12". The verbose log might have more information about the error. The command started with the following:
"CREATE USER [marketingautomationuser] WITH PASSW"
 Password validation failed. The password does not meet Windows policy requirements because it is too short. http://go.microsoft.com/fwlink/?LinkId=178587  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.
Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)
At C:\sitecore\install\installation.ps1:57 char:1
+ Install-SitecoreConfiguration @xconnectParams -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:01:25
Transcript stopped, output file is C:\sitecore\install\xconnect-xp0.180608 (2).log
Invoke-CommandTask : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\Public\Tasks\Invoke-WebDeployTask.ps1:36 char:2
+     Invoke-CommandTask -Path $Path -Arguments $msdeployArgs -TaskName ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-CommandTask

Error points to the line 57 of my installation.ps which is last line below

$xconnectParams = @{     
    Path = "$PSScriptRoot\xconnect-xp0.json"     
    Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002 (OnPrem)_xp0xconnect.scwdp.zip"     
    LicenseFile = "$PSScriptRoot\license.xml"     
    Sitename = $XConnectCollectionService     
    XConnectCert = $certParams.CertificateName     
    SqlDbPrefix = $prefix  
    SqlServer = $SqlServer  
    SqlAdminUser = $SqlAdminUser     
    SqlAdminPassword = $SqlAdminPassword     
    SolrCorePrefix = $prefix     
    SolrURL = $SolrUrl      
    } 

Install-SitecoreConfiguration @xconnectParams -Verbose  // Line # 57

It has nothing to do with my SQL password. My SQL Server password is very complex. It have tried several complex passwords. It is trying to create a user from what i see and fails there "CREATE USER [marketingautomationuser] WITH PASSW"

marked as duplicate by Amitabh Vyas, Patrick Barron, Sitecore Sam, Peter Procházka, Anton Jun 18 at 8:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The error might be misleading. Did you try sitecore91234###9900 as a password? – Mark Cassidy Jun 8 at 10:16
  • My SQL EXPRESS password is admin1234##9900 – Sallu Jun 8 at 10:19
  • can you try a strong password like 2!SiteCore . This question I would say is not related to Sitecore, is more Sql question – Vlad Iobagiu Jun 8 at 10:20
  • I'm voting to close this question as off-topic because is related to Sql not Sitecore – Vlad Iobagiu Jun 8 at 10:23
  • Actually it isn't @VladIobagiu. I'm betting that Sitecore generates the password for [marketingautomationuser] based on something that ends up being too short – Mark Cassidy Jun 8 at 10:24
up vote 4 down vote accepted

Given the error and the complexity of your admin password, this might be related to the password being assigned to the marketing user when it is being created. By default, I believe this is Test12345.

Try updating the values in your XP0 JSON config file for the passwords being assigned to the created users for each database. I have had this issue when installing on a secure installation because the default password in the JSON file was not complex enough.

NOTE: This applies to both xconnect-xp0.json and sitecore-xp0.json files.

  • I did try that. Just it seems that my edits are not coming into effect. How to correctly edit the json file? I posted this question also sitecore.stackexchange.com/questions/12231/… – Sallu Jun 8 at 14:47
  • The default is indeed Test12345: "SqlMarketingAutomationPassword": { "Type": "string", "DefaultValue": "Test12345", "Description": "The Sql password for the Marketing Automation connection string in Sitecore." – Ed Schwehm Jun 8 at 14:53
  • @Sallu search for Test12345 and 12345 is the JSON files and replace the passwords respecting you SQL server password policies. – Amitabh Vyas Jun 8 at 14:53
  • Thanks. This worked. I now failed on 28th step instead of getting stuck on 15th step. – Sallu Jun 8 at 14:54
  • 1
    @Jay S will you please edit your answer to clearly state that both files xconnect-xp0.json and sitecore-XP0.json should be edited and value for DefaultValue must be changed. Your answer is right answer and I will accept just I dont want anyone else to waste 24 hours again. – Sallu Jun 8 at 14:55

The password for the marketingautomationuser account comes from the sitecore-xp0.json and xconnect-xp0.json files:

    "SqlMarketingAutomationUser": {
        "Type": "string",
        "DefaultValue": "marketingautomationuser",
        "Description": "The Sql user for the Marketing Automation connection string in Sitecore."
    },
    "SqlMarketingAutomationPassword": {
        "Type": "string",
        "DefaultValue": "Test12345",
        "Description": "The Sql password for the Marketing Automation connection string in Sitecore."

Instead of editing these files to change the SqlMarketingAutomationPassword default, you should instead update your installation script to provide the new password:

$SqlMarketingAutomationPassword = "Sup3rSecureS1tecore_pass!" 

$xconnectParams = @{
    Path = "$PSScriptRoot\xconnect-xp0.json"
    Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (OnPrem)_xp0xconnect.scwdp.zip"
    LicenseFile = "$PSScriptRoot\license.xml"
    SiteName = $XConnectCollectionService
    XConnectCert = $certParams.CertificateName
    SqlDbPrefix = $prefix
    SqlServer = $SqlServer
    SqlAdminUser = $SqlAdminUser
    SqlAdminPassword = $SqlAdminPassword
    SolrCorePrefix = $prefix
    SolrURL = $SolrUrl
    SqlMarketingAutomationPassword = $SqlMarketingAutomationPassword
}

$sitecoreParams = @{
    Path = "$PSScriptRoot\sitecore-XP0.json"
    Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp.zip"
    LicenseFile = "$PSScriptRoot\license.xml"
    SqlDbPrefix = $prefix
    SqlServer = $SqlServer
    SqlAdminUser = $SqlAdminUser
    SqlAdminPassword = $SqlAdminPassword
    SolrCorePrefix = $prefix
    SolrUrl = $SolrUrl
    XConnectCert = $certParams.CertificateName
    SiteName = $sitecoreSiteName
    XConnectCollectionService = "https://$XConnectCollectionService"
    SqlMarketingAutomationPassword = $SqlMarketingAutomationPassword
}

As Sallu noted in a comment, the default password for many of the automatically-created accounts is Test12345, which would not meet your Windows password policy requirements. By my count, there are twelve accounts Sitecore creates with the password Test12345. You'll need to update the above code to include all twelve of those accounts and their newer more secure passwords (or, as Sallu suggested, edit the json files directly; still not the preferred solution, but permissible in a pinch).

  • This looks like a much cleaner approach. – Sallu Jun 8 at 15:11
  • 1
    Just a comment to future readers. This wont work because then you will get an error "CREATE USER [referencedatauser] WITH PASSWORD = ". Password validation failed. The password does not meet Windows policy requirements because it is too short. http://go.microsoft.com/fwlink/?LinkId=178587 Either you specify all passwords for all users using @Ed Schwehm method or just edit DefaultValue in json file. It is upto you. – Sallu Jun 11 at 22:14
  • Thanks Sallu, I updated my answer to note the other users. – Ed Schwehm Jun 12 at 14:24

Give this a go, this might solve the problem for you:

Go to: Start > Run > type "secpol.msc"

Then go to: \Security Settings\Account Policies\Password Policy

Then disable 'password must meet complexity requirements' and apply

then try again.

obviously this should only be done on local dev environments and not on other environments.

  • 1
    This would be a workaround however, not an actual answer – Mark Cassidy Jun 8 at 11:08
  • Thats true, it won't solve the problem for installs in other environments with this policy enabled. In my settings this isn't enabled and I've installed Windows 10 and SQLExpress fairly recently so I'm guessing the default is that this is off so if it's just for development machines it feels like an acceptable approach. – Adam Seabridge Jun 8 at 11:10
  • 1
    I think that this is not question related to Sitecore but more Windows settings so answer is fitting the purpose to help and then delete the question as no longer reproducible :) – Peter Procházka Jun 8 at 11:25
  • @AdamSeabridge I did try that even before posting the question. Just I cant do it. I am local admin of the computer, but still the computer is from my employer and has this feature disabled. This was the first workaround that I tried and failed :-) – Sallu Jun 8 at 14:25
  • 1
    I agree. Definitely a Sitecore issue, this. – Mark Cassidy Jun 8 at 14:56

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