I apologise to my fellow Mac experts for stating what to them will be obvious but do so for the benefit of other readers.
Mac apps (mostly) use XML format preference files signified by a file extension of .plist
These preference files can be in one of three locations.
1. ~/Library/Preferences - that is in the Preferences folder in the Library folder in the users home directory
2. /Library/Preferences
3. /Library/Managed Preferences
(I am deliberately ignoring the ByHost folders.)
In theory it does not make any difference which location is used, it is also possible to have the same plist file in more than one location and have some keys in one copy and some keys in the other and the macOS will effectively merge the two although if a key is in both obviously only one version will have an effect.
This works for me for the case of a preference file in ~/Library/Preferences and /Library/Preferences
However if I have the same preference file pushed out via - in my case Jamf Pro so that it ends up in /Library/Managed Preferences and also have the same preference file in ~/Library/Preferences then this does not work. In this case it seems to only read the Jamf Pro version even though there is no conflicting keys and yes the same preference file name is used.
The reason I want to do this is I plan to store a 'security key' in a preference file in -
/private/var/root/Library/Preferences
but to push all other settings for the app out via Jamf Pro. This is because otherwise it is possible for even an ordinary level user to view the content of the Jamf Pro version including of course the security key. As the above location is not accessible to standard level users and not in the Finder to even Admin level users.
Can anyone comment on whether this is 'expected behaviour' or a bug or whether I am 'holding it wrong' 😀