diff --git a/Dockerfiles/agent/windows/Dockerfile b/Dockerfiles/agent/windows/Dockerfile index 7f18cbfce..9ec54af6c 100644 --- a/Dockerfiles/agent/windows/Dockerfile +++ b/Dockerfiles/agent/windows/Dockerfile @@ -46,7 +46,8 @@ RUN Set-Location -Path $env:SystemDrive\.; ` New-Item -ItemType directory -Path $env:ZBX_HOME\modules | Out-Null; ` New-Item -ItemType directory -Path $env:ZBX_HOME\buffer | Out-Null; ` ` - net user /add zabbix; ` + net accounts /MaxPWAge:unlimited; ` + net user /add zabbix /expire:never /passwordreq:no; ` $acl = Get-Acl -Path $env:ZBX_HOME; ` $ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); ` $acl.AddAccessRule($ace); ` diff --git a/Dockerfiles/agent2/windows/Dockerfile b/Dockerfiles/agent2/windows/Dockerfile index ec2f2b19a..943daa182 100644 --- a/Dockerfiles/agent2/windows/Dockerfile +++ b/Dockerfiles/agent2/windows/Dockerfile @@ -46,7 +46,8 @@ RUN Set-Location -Path $env:SystemDrive\.; ` New-Item -ItemType directory -Path $env:ZBX_HOME\modules | Out-Null; ` New-Item -ItemType directory -Path $env:ZBX_HOME\buffer | Out-Null; ` ` - net user /add zabbix; ` + net accounts /MaxPWAge:unlimited; ` + net user /add zabbix /expire:never /passwordreq:no; ` $acl = Get-Acl -Path $env:ZBX_HOME; ` $ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); ` $acl.AddAccessRule($ace); `