Mavericks MCX Delete Command?

frank
New Contributor III

Hi everyone,

Seems that dscl . -mcxdelete /Users/username command (from this KBA https://jamfnation.jamfsoftware.com/article.html?id=144) doesn't really do much in Mavericks to remove MCX settings from our local admin account. Deleting what is under /Library/Managed Preferences/ for our admin account also doesn't do anything to temporally reset settings for support staff to troubleshoot things we "manage" for end users.

All of the above worked in Mountain Lion but so far in testing nothing seems to remove the MCX settings for the targeted user while bound to the JSS. I'm running 8.73 with the GM build of 10.9

If anyone has any suggestions or know another way with Mavericks i'm all eyes :)

13 REPLIES 13

frank
New Contributor III

Anyone?

philcebutv
New Contributor III

This is exactly what we have in our environment. Those settings that we managed using WGM does not get reset when deleting /Library/Managed Preferences/. We are having a hard time managing our end users.

Please let me know if you find any sort of command to temporarily resets managed preferences

philcebutv
New Contributor III

Logging as root seems to bypass the managed preferences settings. However, there are times that needing to bypass managed pref under the end user accounts. I am really wanted to know if there is a way to do this in mavericks. Prior to mavericks we used to delete/Library/Managed Preferences/ and it will reset temporarily but not anymore in mavericks

acostj
New Contributor II

There are the areas you need to reset for MCX.

Machine MCX
dscl . -mcxdelete /Computers/localhost

For each user
dscl . -mcxdelete /Users/username

root
dscl . -mcxdelete /Users/root

Managed Preferences folder
rm -rfd /Library/Managed Preferences

These will temporarily reset MCX till Mac re-syncs MCX back with JSS.

philcebutv
New Contributor III

will these commands also delete preferences managed by WorkGroup Manager?

philcebutv
New Contributor III

I have got to try these command once I am back in the office. However, thread starter Franks states that it does not work on their Mavericks environment :(

bentoms
Release Candidate Programs Tester

Hi all,

I've stuggled with this too.

Tbh, I think we're falling fowl of 10.9 aggressive preference caching.

http://hints.macworld.com/article.php?story=20130908042828630

https://groups.google.com/forum/m/#!topic/macenterprise/YgJnfqpyKNs

I've not tried the commands in the thread & then some of the cfprefs commands in the links, but might be worth a shot.

mm2270
Legendary Contributor III

All the above commands plus killall cfprefsd at the very end seems to do the trick. Without adding in that last line some of the settings remain in place under Mavericks, so @bentoms is correct that it seems to be Mavericks' more aggressive preference caching getting in the way.

acostj
New Contributor II

Nice the cfprefsd seems to be the trick in 10.9, glad to hear it helped.

I figured out these problems with MCX back in 10.6 been using these commands to cleanup MCX since then.

franton
Valued Contributor III

bentoms
Release Candidate Programs Tester

@mm2270 & @jcosta, sometime hunches pay off! :)

philcebutv
New Contributor III

I can confirm that deleting /Library/Managed Preferences will work when issuing killall cfprefsd as mentioned by mm2270. Tested this on Mavericks!

franton
Valued Contributor III

My script has been updated to match.