We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b7f2d1 commit b250b0fCopy full SHA for b250b0f
1 file changed
src/install.ps1
@@ -19,7 +19,11 @@ $out = Get-LocalUser -Name $userName -ErrorAction SilentlyContinue
19
if($null -eq $out)
20
{
21
Write-Host "--- Adding local user '$userName' for patroni service ---" -ForegroundColor blue
22
- $Password = -join (("a".."z")+("1".."9")+("A".."Z")+("!"..".") | Get-Random -Count 8)
+ $Password = ("a".."z")+("A".."Z") | Get-Random -Count 4
23
+ $Password += ("!"..".") | Get-Random -Count 2
24
+ $Password += ("0".."9") | Get-Random -Count 2
25
+ $Password = -join($Password)
26
+
27
$SecurePassword = ConvertTo-SecureString $Password -AsPlainText -Force
28
New-LocalUser $userName -Password $SecurePassword -Description "Patroni service account"
29
$ConfFile = 'patroni\patroni_service.xml'
0 commit comments