We've been trying to disable some of the PrefPanes for non-admin users (local or network) for Mac with OSX >=10.11.
- We tried to modify the Pref Panes' access rights with a script launched with a policy (logon trigger) :
#!/bin/sh su sudo chown root:admin /System/Library/PreferencePanes/.prefPane sudo chmod 750 /System/Library/PreferencePanes/.prefPane sudo chmod 755 /System/Library/PreferencePanes/Accounts.prefPane sudo chmod 755 /System/Library/PreferencePanes/Appearance.prefPane
- The script executes, but unfortunately an admin account does not have (at least anymore) the rights to modify the access on those files.
chown: /System/Library/PreferencePanes/Accounts.prefPane: Operation not permitted chown: /System/Library/PreferencePanes/AppStore.prefPane: Operation not permitted
- We also tried to modify the systempreferences plist with another script:
defaults write $LoggedInUserHome/Library/Preferences/com.apple.systempreferences DisabledPreferencesPanes-Raw '( "com.apple.preference.desktopscreeneffect", "com.apple.preference.security", "com.apple.preference.energysaver", "com.apple.preferences.icloud", "com.apple.preferences.network", "com.apple.preferences.sharingpref", "com.apple.preferences.parentalconrol", "com.apple.preferences.appstore", "com.apple.preferences.dateandtime", "com.apple.preferences.startupdisk", "com.apple.preferences.timemachine", "com.apple.preferences.profiles", )'
The plist is modified, but we don't see any effect on the user access of the PrefPanes (the specified options are not disabled).
Does anyone have any idea about how to disable the PrefPanes options (>=10.11) ?
Thank you in advance.