Quick Managed Preferences (MCX) question

darms21
New Contributor

Hi all,
Is a managed preference executed if it appears in the /Library/Managed Preferences folder? Or does it need to appear in this folder as well as update the plist that the managed preference is supposed to address. For example, I am using managed preferences to disable AirDrop. The managed preference: com.apple.NetworkBrowser.plist appears in the /Library/Managed Preferences folder but it doesn't appear to have been re-written /Library/Prefences/com.apple.NetworkBrowser.plist........Should it have edited the file in /Library/Prefences/ or does having it in /Library/Managed Preferences mean that is is being applied?

Thanks!

1 ACCEPTED SOLUTION

clifhirtle
Contributor II

@darms try looking at the data from another view:

1) Do you see the policy you applied listed when you run "mcxquery -user YourLoggedInAccount" in the Terminal? 2) If you fire up System Profiler and select the Software-Managed Client, do you see your policy listed there?

Either way should prove an additional means of visualizing what policies are applying for a given account.

View solution in original post

6 REPLIES 6

jdziat
Contributor

/Library/ManagedPreferences in my experience typically means you are using workgroup manager. If you are using JSS to manage your clients than you should apply the changes to /Library/Preferences(Computer Wide) ~/Library/Preferences (User). This is a relatively simple answer but should steer you in the right direction

darms21
New Contributor

I am using the JSS's "Managed Preferences" options to disable AirDrop but the only place I am seeing the com.apple.NetworkBrowser DisableAirDrop -bool YES statement is in /Library/Managed Preferences. The JSS apparently copies the managed prefernce i set up the JSS to /Library/Managed Preferences but it is not editing the com.apple.NetworkBrowser plist in either /Library/Preferences(Computer Wide) or ~/Library/Preferences (User).

Any ideas why that might be? I assume because the plist in either /Library/Preferences(Computer Wide) or ~/Library/Preferences (User) are not being updated to reflect the change that it is not being applied...Is that a correct assumption?

jdziat
Contributor

The easiest thing to do would be to send a script to the client to disable the airdrop feature such as
defaults write /Library/Preferences/com.apple.NetworkBrowser DisableAirDrop -bool YES

or create a managed preference with the following settings
under definition Computer Level = Allow
Domain = com.apple.NetworkBrowser
Key Name = DisableAirDrop
Key Type = Boolean
General
Display Name = Whatever you want
Apply Setting to = System Level Enforced
Value = false

Let me know if that works

darms21
New Contributor

jdziat - I've already created a managed preference as you suggest in the 2nd part of your response. My question is.....after I have create this preference and assigned it to a profile I am unsure if it is being implemented because the system targeted does not show: /Library/Preferences/com.apple.NetworkBrowser DisableAirDrop -bool YES, instead it show this change only in /Library/Managed Preferences.

clifhirtle
Contributor II

@darms try looking at the data from another view:

1) Do you see the policy you applied listed when you run "mcxquery -user YourLoggedInAccount" in the Terminal? 2) If you fire up System Profiler and select the Software-Managed Client, do you see your policy listed there?

Either way should prove an additional means of visualizing what policies are applying for a given account.

darms21
New Contributor

Thanks for sticking w/ me guys! Much appreciated!