macOS Catalina and scripts that asks for authorization
I until Mojave I was used to install some kind of software using Kace Online Shell scripts with commands like the following:
sudo /usr/sbin/installer -pkg MyApplication-x86_64.pkg -target /
starting from Catalina, the same script with the same application failed. If I run the same script directly from the bash I get this window
and I guess this is the reason why the script fails. It does not have enough permissions.
Is there a way to get rid of this? I know that I would need a MDM, but I need to push a critical software before people upgrade to Big Sur.
Thanks
Answers (1)
You need to install a privacy profile to give scripts the correct access. Here's a utility that will generate them for you:
https://github.com/jamf/PPPC-Utility
Also, the KACE client already runs in the root context, so there is no need to prepend commands in scripts with sudo.