Disable password expiry

Since we set RTC in the Nix build it's likely that any passwords have
expired since the image generation RTC time.

Ideally this should be applied in autounattend.xml but it didn't work
out either as FirstLogonCommands or as a command in the specialize pass.
This commit is contained in:
adisbladis 2020-06-29 11:33:04 +02:00
parent 9ab221db7f
commit 6f546f5e25
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7
1 changed files with 11 additions and 1 deletions

View File

@ -156,7 +156,17 @@ let
echo "Done" echo "Done"
mv c.img $out mv c.img $out
'')) baseImage installCommands; '')) baseImage (
[
{
name = "DisablePasswordExpiry";
script = ''
win exec 'wmic UserAccount set PasswordExpires=False'
'';
}
] ++
installCommands
);
in in