Setting user-level global preferences in a macOS configuration profile
2023-5-12 23:12:3 Author: derflounder.wordpress.com(查看原文) 阅读量:24 收藏

Home > Mac administration, macOS, Management Profiles > Setting user-level global preferences in a macOS configuration profile

Setting user-level global preferences in a macOS configuration profile

When managing user settings with a profile, you often need to define what the preference domain is in order to specify which settings to manage. Usually you can check the CFBundleIdentifier of an application to get the unique identifier used to define the preference domain.

Normally, these unique IDs (and corresponding preference domains) use a reverse-DNS-lookup scheme. For example, the preference domain for Apple’s web browser Safari is the following:

com.apple.Safari

This is derived from:

a. Apple using the following domain name:

apple.com

b. The application in question being named Safari.

Note: This is a convention, rather than a hard and fast requirement, but most applications’ unique identifiers and corresponding preference domains will use this naming convention.

However, there’s an exception to be aware of. macOS uses a special domain to identify settings which should apply to all applications started by the same user. This preference domain is called the NSGlobalDomain, but unlike most preference domains, you don’t use NSGlobalDomain to define the preference domain when trying to manage their settings with a profile. This can cause some confusion when trying to manage these settings. The preference domain in this case is the following:

.GlobalPreferences

For more details, please see below the jump.

You can see an example of this is a profile I’ve written for managing the scrollbar visibility settings for applications.

Screenshot 2023 05 12 at 10 37 23 AM

The .GlobalPreferences preference domain can also be used by Jamf Pro’s profiles, in the Application & Custom Settings profile payload.

Screenshot 2023 05 10 at 4 28 36 PM


文章来源: https://derflounder.wordpress.com/2023/05/12/setting-user-level-global-preferences-in-a-macos-configuration-profile/
如有侵权请联系:admin#unsafe.sh