1

Is it possible to use Puppet on Windows where UAC is enabled? Does Puppet have any method for automatically saying yes to UAC prompts for a software install? My module does the following workflow:

Downloads an MSI file locally from the Puppetmaster

Creates a local batch file using template function which does cmd.exe /c msifile.msi /i /quiet ....

Runs bat file in an Exec.

Unfortunately, it fails due to UAC, I am wondering how people are working around UAC in their Windows Puppet environments. The Puppet documentation seems to only talk about Puppet's own executable in regards to UAC.

usedTobeaMember
  • 616
  • 15
  • 25

1 Answers1

2

If UAC is active and configured to require manual approval for administrative actions, there is no way to bypass it; this is by design. Your only option is to configure it in a different way.

You can manage UAC either using Group Policies or each system's local security policy; this way, you can allow administrative users to perform administrative actions without being prompted by UAC each time. This can be set separately for the built-in Administrator account and for all other administrative users; unfortunately, there is no way to bypass UAC only for a specific user (unless that user is the built-in Administrator), thus you can't create an UAC-bypassing user account in order to use it for your deployment.

Your best option here is to configure UAC for auto-approval before starting your deployment, run your Puppet deployment, and then re-enable UAC; the easiest way to accomplish this is to create an Active Directory OU for staging computers, link an appropriate GPO to that OU, place computers inside the OU during deployment and move them back to where they belong after the deployment is completed.

Massimo
  • 70,200
  • 57
  • 200
  • 323