andyneiu wrote:
When you use the sudo command via ARD, you'll have to also put the administrator password on the second line. For example:
(line 1): sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL
http://foo.bar.com:8088/
(line 2): password
The sudo command will be sent and when the target computer asks for the password, ARD will automatically send them the password on the second line.
This is actually not necessary in my experience. When issuing a Unix command via ARD, you have the option of changing the user the command is running under (Run command as:), using the little radio button called User. I use that and type in "root"
Note that the root user is not enabled on any of the Macs I manage. But issuing the command as "root" is equivalent to doing sudo, provided how you've connected to the client machines is as an admin user with full access to the Macs.
So in the command above I just use:
defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL
http://foo.bar.com:8088/
Note the absence of sudo at the beginning of the command. But I run the command as root and no password is needed in a second line.