UNIX command for terminal
Here is what I want to do:
I want to send the terminal command to 25 laptops all at once to direct them to our internal server for software update.
I know how to log in to all of the machines at once.
osascript -e 'tell application "System Events"' -e 'keystroke "username"' -e 'keystroke tab' \
-e 'delay 0.5' -e 'keystroke "password"' -e 'delay 0.5' -e 'keystroke return' -e 'end tell'
I know how to open terminal.
open -a terminal
Now what I want to know is how to have it type this in for me:
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURLhttp://SERVER.local:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.su catalog
Then have a pause and then type my password.
Bonus points for then a script to force it to check for and do the update.
MacBook Pro, OS X Mountain Lion (10.8)