sudo softwareupdate -i -r -R --force
This works fine in scripts up until Catalina but the Software Update Tool has changed behaviour in Big Sur, requiring password(after searching for updates) even when run as root.
Is there a way around this or do we need to find another way of installing security upgrades?
I have 2 policies
one to upload the "Install macOS Big Sur.app" to the Applications folder
the other to run the "/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction && sleep 10 && osascript -e 'tell application "Self Service" to quit'" in the Files and Processes > Execute Command.
Updating to Big Sur is fine for me. Updating to 11.1 from 11.0.1 is giving headache since Apple no longer release pkg file to download after Big Sur. Only way I can think of to update is sudo softwareupdate -i -r -R --force but it does not seem like its working properly without a user login.