A better way to handle these (in my opinion) is to use the Secrets.prefPane .. and the related website:
A much more comprehensive collection of tweaks and tips for OSX administration.. though I did learn a few things from WhiskyKilo which were quite interesting - I have wondered how to do this from the command line for years and am glad to have finally learned: "sudo softwareupdate -i -a" .. fantastic!