CatalogURL not being applied by Configuration Profile.

CCNapier
Contributor

Hi folks.

My CatalogURL doesn't appear to be applying on devices.

  1. NetSus update server setup on network.
  2. Config profile applied on my Mac 10.11 via Casper 9.92

Profiles on local device show: Software Update Settings, CatalogURL:
http://myserver.fqdn/content/catalogs/indesx_Root.sucatalog
So the policy is applied (even says in JSS)

However a quick Terminal command:

defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist CatalogURL

Shows:
http://myserver.fqdn:8088/index.sucatalog

Am I doing something wrong here?
http://myserver.fqdn/content/catalogs/indesx_Root.sucatalog is accessible from a webpage from the device. No updates are found when running the update.

Any advice?
Thanks!

5 REPLIES 5

janis_watts
New Contributor
New Contributor

@CCNapier have you tried running softwareupdate -l from terminal on the device to see if any updates are found or if the server can be reached?

I also applied a Configuration Profile to my device to set the software update server. That doesn't appear to change the CatalogURL in the com.apple.SoftwareUpdate.plist file, but running the above command in Terminal gave me:

TestComputer:~ admin$ softwareupdate -l
Software Update Tool
Copyright 2002-2015 Apple Inc.

Finding available software
Can't connect to the Software Update server (myserver.fdqn).

So it appears, at least in my case, that the device is trying to reach out to the server url that is specified in the configuration profile (it just doesn't find any updates because the url isn't reachable).

Hope that helps!

Janis

stevevalle
Contributor III

We run an Apple Software Update server but the commands should be the same!

I run

defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL http://server-url:8088/

and then

defaults read /Library/Preferences/com.apple.SoftwareUpdate CatalogURL

I get

http://server-url:8088/

If I then run

softwareupdate -l

I get

Software Update Tool
Copyright 2002-2015 Apple Inc.

Finding available software
Software Update found the following new or updated software:
   * iTunesX-12.5.3
    iTunes (12.5.3), 262996K [recommended]

I used to have /index.sucatalog in the url but for some reason that stopped working, so I removed it. Run the defaults write command locally and see if you can contact the server.

Also, with the Apple Software Update server, the server needs to be running on the same OS as the updates it's pushing out. If you are running 10.11 on the server, it won't be able to provide 10.12 related updates.

franton
Valued Contributor III

Just to clarify (and a bit of a plug for Ben & James' JNUC 2016 talk) but the defaults command reads from the .plist file. The configuration profile goes to the memory cached prefs, so the file doesn't reflect what's been set by the profile.

The configuration profile could be active, but defaults will not give a true reading. This is why most of my CIS work uses the macOS API via PythObjC. To read the actual setting out, you'd need some code like this:

#!/usr/bin/python

import CoreFoundation

domain = 'com.apple.SoftwareUpdate'
key = 'CatalogURL'

key_value = CoreFoundation.CFPreferencesCopyAppValue(key, domain)

print "CatalogURL set to: %s" % key_value

CCNapier
Contributor

@franton Thanks, that is good information. That's why I'm seeing a difference then and that technically answers the question in this post.

ostermmg
New Contributor

@franton Excellent! This is EXACTLY what I was looking for.