MacOS softwareupdate "Failed to authenticate" over ARD
I'm having trouble updating MacOS on my lab's M1 iMacs. I'm using Apple Remote Desktop and content caching.
After having tried the usual softwareupdate commands and failing, I've tried including the local admin's username and password, as instructed by the documentation in -h and the softwareupdate man page. This doesn't seem to be working, though, and I'm hoping someone can tell me why. (Oddly enough, occasionally one computer out of 40 will work, but usually not).
Here's what I'm sending out (run as root from ARD:
/usr/sbin/softwareupdate -i 'macOS Sonoma 14.2.1-23C71' --user adminun --stdinpass adminpw --agree-to-license -R
I've found in the past that running the full /usr/sbin path helps alleviate a lot of problems. I've also tried the above with --force, which makes no difference.
The update seems to download just fine, but then won't install and I get the following:
2024-01-09 13:12:48.879 softwareupdate[1308:150389] XType: com.apple.fonts is not accessible.
2024-01-09 13:12:48.879 softwareupdate[1308:150389] XType: XTFontStaticRegistry is enabled.
Software Update Tool
Finding available software
Downloading macOS Sonoma 14.2.1
Downloaded: macOS Sonoma 14.2.1
Failed to authenticate
Does anyone have any idea why this isn't working? Please help if you can... I have so many computers to update.
iMac (M1, 2021)