Skip to content

Commit

Permalink
Merge pull request #144 from slide/password_fix
Browse files Browse the repository at this point in the history
Fix issue with Windows passwords expiring
  • Loading branch information
slide committed Jul 15, 2020
2 parents 826399e + a1c23d8 commit 0c80067
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion 11/windows/nanoserver-1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 11/windows/windowsservercore-1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion 8/windows/nanoserver-1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions 8/windows/windowsservercore-1809/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c80067

Please sign in to comment.