diff --git a/11/windows/nanoserver-1809/Dockerfile b/11/windows/nanoserver-1809/Dockerfile index 724fd6abd..1f7876122 100644 --- a/11/windows/nanoserver-1809/Dockerfile +++ b/11/windows/nanoserver-1809/Dockerfile @@ -73,7 +73,8 @@ ARG user=jenkins ARG AGENT_FILENAME=agent.jar ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1 -RUN net user "$env:user" /add /expire:never /passwordreq:no ; ` +RUN net accounts /maxpwage:unlimited ; ` + net user "$env:user" /add /expire:never /passwordreq:no ; ` net localgroup Administrators /add $env:user ; ` setx /M PATH '%PATH%;%JAVA_HOME%\bin' ; ` New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null diff --git a/11/windows/windowsservercore-1809/Dockerfile b/11/windows/windowsservercore-1809/Dockerfile index 76ff1d5d8..36970c043 100644 --- a/11/windows/windowsservercore-1809/Dockerfile +++ b/11/windows/windowsservercore-1809/Dockerfile @@ -55,6 +55,7 @@ ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1 RUN net user "$env:user" /add /expire:never /passwordreq:no ; ` net localgroup Administrators /add $env:user ; ` + wmic useraccount WHERE Name=$env:user set PasswordExpires=false; ` New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null ARG AGENT_ROOT=C:/Users/$user diff --git a/8/windows/nanoserver-1809/Dockerfile b/8/windows/nanoserver-1809/Dockerfile index 9cdaf336c..e2d9c5d8f 100644 --- a/8/windows/nanoserver-1809/Dockerfile +++ b/8/windows/nanoserver-1809/Dockerfile @@ -75,7 +75,8 @@ ARG user=jenkins ARG AGENT_FILENAME=agent.jar ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1 -RUN net user "$env:user" /add /expire:never /passwordreq:no ; ` +RUN net accounts /maxpwage:unlimited ; ` + net user "$env:user" /add /expire:never /passwordreq:no ; ` net localgroup Administrators /add $env:user ; ` New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null diff --git a/8/windows/windowsservercore-1809/Dockerfile b/8/windows/windowsservercore-1809/Dockerfile index 364c2409a..ab404ccae 100644 --- a/8/windows/windowsservercore-1809/Dockerfile +++ b/8/windows/windowsservercore-1809/Dockerfile @@ -55,6 +55,7 @@ ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1 RUN net user "$env:user" /add /expire:never /passwordreq:no ; ` net localgroup Administrators /add $env:user ; ` + wmic useraccount WHERE Name=$env:user set PasswordExpires=false; ` New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null ARG AGENT_ROOT=C:/Users/$user