TransWikia.com

How do I instantiate policies in Chrome on mac?

Super User Asked on November 4, 2021

This is the set of policies that I want for my installation of Chrome (converted to json):

{
   "chromePolicies": {
      "BrowserAddPersonEnabled": {
         "level": "recommended",
         "scope": "machine",
         "source": "platform",
         "value": false
      },
      "BrowserGuestModeEnabled": {
         "level": "recommended",
         "scope": "machine",
         "source": "platform",
         "value": false
      },
      "ExtensionInstallForcelist": {
         "level": "mandatory",
         "scope": "machine",
         "source": "platform",
         "value": [ "pncfbmialoiaghdehhbnbhkkgmjanfhe", "mdnleldcmiljblolnjhpnblkcekpdkpa", "cjpalhdlnbpafiamejdnhcphjbkeiagm" ]
      }
   }
}

I’ve tried to instantiate these policies in a number of ways, including:

  1. Edited the com.google.Chrome.plist in /Library/Managed Preferences/Preferences
  2. Edited the com.google.Chrome.plist in /Library/Preferences
  3. Ran these commands:
defaults write com.google.Chrome BrowserAddPersonEnabled -bool false
defaults write com.google.Chrome BrowserGuestModeEnabled -bool false
defaults write com.google.Chrome ExtensionInstallForcelist -array 
  '{ pncfbmialoiaghdehhbnbhkkgmjanfhe; }' 
  '{ mdnleldcmiljblolnjhpnblkcekpdkpa; }' 
  '{ cjpalhdlnbpafiamejdnhcphjbkeiagm; }'
  1. Installed mcxToProfile and converted my policies file to a profile and then installed that profile on my Mac OS, according to these instructions. That was with this command: python mcxToProfile.py --plist /Library/Preferences/com.google.Chrome.plist --identifier com.google.Chrome

Every time I edit the policies, they fail to stick. They might appear in Chrome for the current session but they go away after I restart my computer (specifically the extension install forcelist).

One Answer

The Google article Use master preferences for Chrome Browser discusses the question of deploying default preferences to Chrome users. These preferences are applied when users first open the Chrome Browser.

The article says:

To apply settings that you don’t want users to change, enforce Chrome policies on Windows or Mac computers instead.

If a setting is managed by a Chrome policy and also configured in the master_preferences file, the policy takes precedence and users can’t edit the setting. For details, see View a device’s current Chrome policies

These preferences are contained in the master_preferences file. An example such file can be downloaded as a starting point and then edited using a text editor to add the required parameters. Its format is JSON.

Answered by harrymc on November 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP