mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-28 18:53:10 +01:00
Fixed password expiration on Windows based images
This commit is contained in:
parent
19acd6dad4
commit
33388a5d56
@ -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\modules | Out-Null; `
|
||||||
New-Item -ItemType directory -Path $env:ZBX_HOME\buffer | 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; `
|
$acl = Get-Acl -Path $env:ZBX_HOME; `
|
||||||
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
||||||
$acl.AddAccessRule($ace); `
|
$acl.AddAccessRule($ace); `
|
||||||
|
@ -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\modules | Out-Null; `
|
||||||
New-Item -ItemType directory -Path $env:ZBX_HOME\buffer | 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; `
|
$acl = Get-Acl -Path $env:ZBX_HOME; `
|
||||||
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
$ace = New-Object Security.AccessControl.FileSystemAccessRule ('zabbix', 'Modify', 'ContainerInherit, ObjectInherit', 'InheritOnly', 'Allow'); `
|
||||||
$acl.AddAccessRule($ace); `
|
$acl.AddAccessRule($ace); `
|
||||||
|
Loading…
Reference in New Issue
Block a user