"sudo softwareupdate -i -r -R --force" doesnt work unattended in Big Sur

abnaau
New Contributor III
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?

5 REPLIES 5

abnaau
New Contributor III

I guess I can answer my own question with this blog post:
https://babodee.wordpress.com/2020/11/11/no-more-sudo-with-softwareupdate-or-unattended-updates-on-macos-running-on-apple-silicon-2/

It's broke. No way to fix it. Working as intended.

tam_tran
New Contributor

I'm trying to update Mac OS to 11.1 using the same command line. So there is no way for IT Admin to control the update or work around?

sgiesbrecht
Contributor II

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.

Downloading the macOS every month is just not realistic, a networking nightmare, and not really a solution. 

tam_tran
New Contributor

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.