简体   繁体   中英

Mandatory Chrome Policies on Mac

I'm trying to install a private Chrome extension on OS X by modifying Chrome policies. I was able to do this successfully on Windows by editing the relevant HKEY_LOCAL_MACHINE registry, but on OS X I'm having problems.

Using the following commands, the policies show up in chrome://policy but have a "recommended" level instead of "mandatory" on Windows.

defaults write com.google.Chrome ExtensionInstallSources -array "http://install-url.com/*"
defaults write com.google.Chrome ExtensionInstallWhitelist -array "chrome-extension-id"

Whenever I attempt to install the extension, Chrome instead just downloads the file and presents a message that Apps, Scripts, and Extensions cannot be installed from this Website.

Any help would be greatly appreciated!

This is an old post, but it came up in a google search and there wasn't an answer here.

The answer to this question after some troubleshooting is as follows:

The file that contains policies that are Recommended is

~/Library/Preferences/com.google.Chrome.plist 

The commands you posted would modify this file if run in the user context

In order to have Mandatory you need to have your Mac managed, by say JAMF or Munki. Once your Mac is managed you can use plists in

/Library/Managed Preferences/

&

/Library/Managed Preferences/$user

Effectively this moves com.google.Chrome.plist from the user context to the machine context. HKCU vs HKLM

The documentation here talks about this more under Debugging https://www.chromium.org/administrators/mac-quick-start

For Mac, the policies for the extension are given in Configuring Apps and Extensions by Policy .

As stated:

The policies for the extension can be configured via MCX preferences for the com.google.Chrome.extensions.gihmafigllmhbppdfjnfecimiohcljba bundle, or for the org.chromium.Chromium.extensions.gihmafigllmhbppdfjnfecimiohcljba bundle if using Chromium.

The complete configuration procedure can be found in the given documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM