valnoxy / Dive

🔥 Fast and Easy way to deploy Windows
https://exploitox.de/dive
GNU General Public License v3.0
6 stars 0 forks source link

[Apply - Unattend] Password expires after some days #14

Closed valnoxy closed 1 year ago

valnoxy commented 1 year ago

The unattend file does not specify the PasswordExpires value.

Possible way to bypass (Component: Microsoft-Windows-Shell-Setup):

<FirstLogonCommands>
  <SynchronousCommand wcm:action="add">
    <Order>1</Order>
    <RequiresUserInput>false</RequiresUserInput>
    <CommandLine>cmd /C wmic useraccount where name="{username}" set PasswordExpires=false</CommandLine>
    <Description>Password Never Expires</Description>
  </SynchronousCommand>
</FirstLogonCommands>

or

SetupComplete.cmd (%WINDIR%\Setup\Scripts\SetupComplete.cmd)

net accounts /maxpwage:unlimited

It might be useful to implement both solutions so that the implementation of command-based functions (such as bloatware removal) can be easily accomplished.

valnoxy commented 1 year ago

fixed