MCX Problem

mbuckner
Contributor

I'm having a weird problem and don't know where to look. I'm using MCX through Casper. I just imaged a group of iMacs. The user mcx setting are working fine. The computer settings were there, but when I logged out they disappeared. Now I can't get them back. Running jamf mcx –verbose shows the policies being applied, but they aren't in /Library/Managed Preferences/.

Any ideas?

Mark Buckner
Bridgeport ISD

3 REPLIES 3

Not applicable

Mark,

There is a previous thread here that may be of some help... (sorry for the resend Mark, forgot to include the list)

---------------
After having this problem today, my colleague and I called JAMF on the phone. We discovered that /var/db/dslocal/nodes/Default/computers/localhost.plist was truncated. It was only abouy 315 bytes long. This file on other systems was over 5K. We moved the file aside, rebooted the system, and OS X recreated it and it was correct. Casper started working again importing managed preferences.
--
Walter Rowe, System Hosting
Enterprise Systems / OISM
walter.rowe at nist.gov
301-975-2885
---------------

However at a recent setup we discovered that out of 700 machine around 50 percent had issues with MCX so as a work around I put this script together (attached) in order to fix the issue. After the initial 70 machines the remainder had no issue.

MCX is applied to the new machines based on smart group membership. This is important when using this script as the machine will reboot again and again unless the MCX prefs populate the /Library/Managed Preferences Directory.

Once added to Casper Admin I set the script to run on Reboot (in Casper Admin) and added it to the SOE configuration. Also I created an extension attribute that looks very similar to create a smart group to check for SOE completion, based on AD binding and MCX directory items.

Extension Attribute, this is essentially the same as the Script but does not have the reboot or removal of the localhost.plist

#-----start Extension attribute script---------
#!/bin/sh
# This script is to check the Managed Preferences to ensure they propagate
# # Tomos Tyler - red wine ink
DIR="/Library/Managed Preferences"
# tell the machine to get its MCX
# look for empty dir
contents=ls -A "${DIR}"
if [ -z ${contents} ]; then echo "<result>MCX FAIL</result>"
else echo "<result>MCX OK</result>"
fi
exit 0
#-----end script---------

mbuckner
Contributor

That is exactly what the problem was. I talked to someone at JAMF yesterday. We ran sudo dscl . -delete /Computers/localhost
to fix it. After that, I ran sudo jamf mcx to get the prefs.

Weird thing - after doing that, about half the time the USER prefs stopped working. Running jamf manage then jamf mcx -username <username> seems to fix that.

Anyway, thanks for the reply. Also, I always forget to include the list :-)

Mark

Not applicable

I will say, this mailing list is probably the most valuable resource we have. Lots of experience and people willing to share.

Walter's post helped me out, and although I do not get much time to contribute I always I use this as a resource and do a spotlight search in the Casper mailing list mailbox before I go any further. So when I have the time I will do what I can. Also, we are hosting the CCA course in Sydney in August, so those attending from Australia I will be on the ground and (hopefully), politely sitting in the background during the CCA. I am yet to clear this (Wudi, Miles :-)... ), but I am sure even if I am not in the room, I will be around. Any one from this list let me know and we will catch up during this week.

Tomos


Tomos Tyler
Tomos.Tyler at compnow.com.au

www.compnow.com.au


![external image link](attachments/0ace1bf151804f758aab700919f6fea8)