Software Update via Unix command but get updates from my OS X server?

I have a OS X server which I use to manage how software update runs on the clients. Currently when you run software update from the client it connects to the server and downloads what it needs which is much faster than downloading it via the internet each time.

now, I would like to run a unix command via ARD that would run software update against the local server. Does anyone know the correct syntax for this? Running softwareupdate -l -a does not work. Thanks

iMac 20" Core Duo, Mac OS X (10.4.6)

Posted on Dec 18, 2007 2:17 PM

Reply
18 replies

Dec 20, 2007 3:19 PM in response to Bruce Carillon1

I'm also in the process of getting my Xserve setup as an internal software update server. I haven't gotten to the point of testing this yet, but I was under the impression that once the clients were managed, any software update command would force the clients to retrieve their updates from your internal server as specified in the MCX settings.

I have a OS X server which I use to manage how software update runs on the clients. Currently when you run software update from the client it connects to the server and downloads what it needs which is much faster than downloading it via the internet each time.


When you say that currently when you run software update from he client it connects to the server and downloads updates, are you referring to running the graphical Software Update tool?

Jan 17, 2008 12:04 PM in response to andyHK

The command you're looking for to reverse the setting is:

sudo defaults delete com.apple.SoftwareUpdate CatalogURL

However, if I may offer a piece of advice: I modified the original command to edit "/Library/Preferences/com.apple.SoftwareUpdate" instead of "com.apple.SoftwareUpdate", as it will affect Software Update globally, not just for the currently logged in user. In the environment I administer, this is a critical detail.

Message was edited by: Jens Lodholm

Jan 25, 2008 9:12 AM in response to ZingIT

I am also using the softwareupdate -i -a command. Assuming the users are logged out.
My question is: what command can i add to tell the client mac to restart after the update is completed? Instead of having to leave a note for users in the morning to restart. If they dont restart we have been having issues. Thanks

Feb 1, 2008 11:06 AM in response to Tom Keep

Via the send unix command (utilizing the current cosole user) I have tried to do

defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL http://foo.bar.com:8088/

and I get the following error:
2008-02-01 11:01:30.698 defaults[15327:10b] Could not write domain com.apple.SoftwareUpdate; exiting

If I prepend it with a sudo It apparently fails looking for a password :


WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:


Any thoughts on what I should do here?

Feb 1, 2008 11:21 AM in response to TonyE

You have to use sudo in order to issue the command. You are editing the /Library/Preferences/com.apple/SoftwareUpdate.plist which can only be edited by an administrator. With that said, you also need to make sure that the user you are trying to sudo as is in the sudoers list. The easiest way to confirm that is that the user is an admin on the workstation. So really the full command should look like this.

sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL http://foo.bar.com:8088/

Make sure to include the trailing /. I found that made a difference. Also you can't include .plist behind com.apple.SoftwareUpdate (I found that out only because I use the tab key to autocomplete any path).

Feb 1, 2008 12:12 PM in response to Jason F

I also resubmitted the command using the administrator (an admin account) account on the machine.

It still failed.

Here's the fun part:
If I simply log in (via ARD) as administrator on the target machine (so I have a desktop).
Then I go back to to ARD and do a send unix command from ARD utilizing the target computers administrator account the command completes successfully WITHOUT the sudo.

This seems like a bug.

Feb 2, 2008 2:02 PM in response to TonyE

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 thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Software Update via Unix command but get updates from my OS X server?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.