Hide System Preferences in Yosemite

jconte
Contributor II

Hi

I am trying to hide some System Preferences in Yosemite. I have been using the same login script from 10.7 and I cannot figure out why it stopped working in Yosemite. I also tried using a configuration profile but because it blocks 3rd Party preferences I cannot use it because it would be a huge task to manage.

Does anyone have a way to hide the preferences in Yosemite ? We are using it as a deterrent for iCloud, Mail and Notifications.

defaults write /Users/$3/Library/Preferences/com.apple.systempreferences.plist HiddenPreferencePanes -array "com.apple.preferences.icloud" "com.apple.preferences.internetaccounts" "com.apple.preference.notifications"

chown $3:staff /Users/$3/Library/Preferences/com.apple.systempreferences.plist

Thanks
Jeff

1 ACCEPTED SOLUTION

cbrewer
Valued Contributor II

This may have to do with how 10.9 and 10.10 cache preferences. Sometimes directly writing to the plist won't work unless you do it as the user. Try it this way to see if it makes a difference:

su -l $3 -c 'defaults write com.apple.systempreferences HiddenPreferencePanes -array "com.apple.preferences.icloud" "com.apple.preferences.internetaccounts" "com.apple.preference.notifications"'

View solution in original post

8 REPLIES 8

cbrewer
Valued Contributor II

This may have to do with how 10.9 and 10.10 cache preferences. Sometimes directly writing to the plist won't work unless you do it as the user. Try it this way to see if it makes a difference:

su -l $3 -c 'defaults write com.apple.systempreferences HiddenPreferencePanes -array "com.apple.preferences.icloud" "com.apple.preferences.internetaccounts" "com.apple.preference.notifications"'

strider_knh
Contributor II

Not sure if this will help but modifying plist files after they have been loaded does not allow the changes to take immediate effect. The OS holds the old settings in memory and continues to use them. I have seen the system then overwrite the changes I made back to what it had in memory after a while, but not always.

What I end up having to do is make the change and then force quit the cfprefsd process. This is the process that hold the settings in memory. As soon as you force quit the process it will start again, this time loading in the new settings from the plist files.

Try cbrewers command and maybe try the command and then force quit cfprefsd.

perrycj
Contributor III

@jconte I had the same problem but then made a custom configuration profile from an OS X Server client. With that, you can enable 3rd party preference panes, or keep them enabled for that matter while restricting other preference panes. You can then import this custom configuration profile into your JSS for distribution. This works as of JSS v. 9.62.

Just an idea if the script gives you problems.

perrycj
Contributor III

Forgot to mention, it would have to be OS X Server v. 3 or above.

gachowski
Valued Contributor II

Thanks Chris,

I couldn't get it working, the profile was still preventing access to 3rd party preference panes. I'll give it another try..

C

jconte
Contributor II

Thank you, Thank you... Chad's response worked for me. I was able to modify my script and now it is working again.

perrycj
Contributor III

@gachowski sometimes when you make it on the OS X server client, you may have to have the 3rd party products/plugins install on that client when you make the profile in profile manager. Hopefully that helps.

Aaron
Contributor II

I once made my own manifest to make it available as a Managed Preference, but I've got no idea where I've left the original manifest file. Can you export from JSS?

Basically, it starts off with a list of the common preference panes, and you remove what you want to keep so only the ones you want to restrict remain. You can manually add back in stuff as well. I'll try to find it, otherwise I"ll recreate it.

Disables (greys out) but does not remove the preference icon.

external image link