Chrome Master Preferences issues

Poseiden951
Contributor

Hello JAMF!

I've tired using this manifest as Managed Preferences (https://jamfnation.jamfsoftware.com/viewProductFile.html?id=73&fid=774), scoped it to my testing computers and Google Chrome will not recognize any of the changes.

I've also tried the Master Preferences file so I could apply the settings during imaging and Chrome didn't recognize it as well.

if [ ! -d "/Library/Google" ]
then
    mkdir "/Library/Google"
fi

(
sudo cat <<'EOD'
{
  "homepage" : "http://domain.com”,
  "homepage_is_newtabpage" : false,
  "browser" : {
    "show_home_button" : true,
    "check_default_browser" : true
  },
  "bookmark_bar" : {
    "show_on_all_tabs" : false
  },
  "distribution" : {
    "suppress_first_run_bubble": true,
    "show_welcome_page" : false,
    "skip_first_run_ui" : true,
    "import_history" : false,
    "import_bookmarks" : false,
    "import_home_page" : false,
    "import_search_engine" : false
  },
  "sync_promo" : {
    "user_skipped" : true
  },
  "first_run_tabs" : [
    "http://domain.com/“
  ]
}
EOD
) > "/Library/Google/Google Chrome Master Preferences"

Can someone point me in the right direction on why Chrome isn't pickung up these changes?

4 ACCEPTED SOLUTIONS

boberito
Valued Contributor

Managed Preferences are sort of a thing of the past I thought.

Have you tried using a custom Configuration Profile to do this? You can push preference settings for apps that way.

View solution in original post

bpavlov
Honored Contributor

In this particular case, there's a bit of a difference in terminology. Google has two ways you can manage Chrome preferences. Through "Preferences" or "Policy". A "preference" is taken from a Master Preferences file and enforced ONCE only allowing the user to make changes as they wish. A "policy" is enforced ALWAYS and will supersede any "preference" you may have set. So if he were to use a policy, regardless if the profile were set to manage only ONCE, it would enforce it ALWAYS (at least from reading their documentation that's what I understand).

Good resources on this are:
http://www.chromium.org/administrators/policy-templates
http://www.chromium.org/administrators/policy-list-3
http://www.chromium.org/administrators/configuring-other-preferences
http://krypted.com/mass-deployment/deploying-and-managing-google-chrome-the-rough-guide/

As to the question at hand, it looks like you have a curly quote rather than a straight quote towards the end:

},
  "first_run_tabs" : [
    "http://domain.com/“

I recommend using a text editor like TextWrangler. Avoid TextEdit. Still that's not the error in your Master Preferences file. I can't take a look at it now, I tried briefly but there's other work I need to get done. But I recommend that you do the following. Add one preference and see if it applies. If it works, great, move to the next preference. If it doesn't, do some research on whether it needs an additional preference to go along with it. It's an iterative process and a lot of trial and error but eventually yoy will find what works and what doesn't. Check the links above. I just did this over the weekend and managed to get a lot of ~/Application Support/Google folders in the trash just through the trial and error process. But I got something that works.

Here's what I got working:

{ 
  "homepage" : "http://www.yahoo.com", 
  "homepage_is_newtabpage" : false, 
  "browser" : { 
    "show_home_button" : true,
    "check_default_browser" : false
  },
  "session" : {
    "restore_on_startup" : 4,
    "urls_to_restore_on_startup" : [
      "http://www.yahoo.com"
    ]
  },
  "bookmark_bar" : { 
    "show_on_all_tabs": true
  }, 
  "sync_promo" : {
    "show_on_first_run_allowed": false
  },
  "distribution" : {
    "disableprintpreview": true,
    "showappsshortcutinbookmarkbar": false,
    "importbookmarks": false,
    "importhistory": false,
    "importhomepage": false,
    "importsavedpasswords": false,
    "importsearchengine": false,
    "importautofillformdata": false,
    "import_bookmarks_from_file": "/Library/Google/chrome_bookmarks.html",
    "skip_first_run_ui": true,
    "suppress_first_run_bubble": true,
    "hidewebstorepromo": false,
    "hidewebstoreicon": false,
    "cloudprintoroxyenabled": false,
    "cloudprintsubmitenabled": false,
    "make_chrome_default": false,
    "proxymode": "system"
  }
}

Good luck!

View solution in original post

timlarsen
Contributor

I have had personally had zero success using the Master Preferences file. I would recommend @boberito's solution and create a custom Configuration Profile manifest that enforces once, or for a less fancy solution appropriate for newly imaged machines, just manually configure chrome while using Composer and be sure the DMG is set to FUT and FEU. Not as best-practice but it will work.

View solution in original post

Poseiden951
Contributor

Used a mobileconifg file, much easier than the Master Preferences file and students can't change it!

edit: Everyone, please use TextWrangler. Saved me a headache!

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PayloadIdentifier</key>
    <string>com.schoolname.profile.chrome</string>
    <key>PayloadRemovalDisallowed</key>
    <true/>
    <key>PayloadScope</key>
    <string>System</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>2015-04-20-6-20</string>
    <key>PayloadOrganization</key>
    <string>school name here</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
    <key>PayloadDisplayName</key>
    <string>Google Chrome Policy</string>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadType</key>
            <string>com.apple.ManagedClient.preferences</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>PayloadIdentifier</key>
            <string>com.normandale</string>
            <key>PayloadUUID</key>
            <string>121-qasd</string>
            <key>PayloadEnabled</key>
            <true/>
            <key>PayloadDisplayName</key>
            <string>Custom: (com.google.Chrome)</string>
            <key>PayloadContent</key>
            <dict>
                <key>com.google.Chrome</key>
                <dict>
                    <key>Forced</key>
                    <array>
                        <dict>
                            <key>mcx_preference_settings</key>
                            <dict>
                                <key>AutoFillEnabled</key>
                                <false/>
                                <key>DefaultBrowserSettingEnabled</key>
                                <false/>
                                <key>BookmarkBarEnabled</key>
                                <true/>
                                <key>HideWebStorePromo</key>
                                <true/>
                                <key>HomepageIsNewTabPage</key>
                                <false/>
                                <key>HomepageLocation</key>
                                <string>http://domain.edu</string>
                                <key>PasswordManagerEnabled</key>
                                <false/>
                                <key>RestoreOnStartup</key>
                                <integer>0</integer>
                                <key>ShowHomeButton</key>
                                <true/>
                                <key>DeviceAutoUpdateDisabled</key>
                                <true/>
                                <key>SyncDisabled</key>
                                <false/>
                                <key>DefaultNotificationsSetting</key>
                                <integer>2</integer>
                                <key>ImportAutofillFormData</key>
                                <false/>
                                <key>ImportBookmarks</key>
                                <false/>
                                <key>ImportHistory</key>
                                <false/>
                                <key>ImportHomepage</key>
                                <false/>
                                <key>ImportSearchEngine</key>
                                <false/>
                                <key>ImportSavedPasswords</key>
                                <false/>
                                <key>AuthNegotiateDelegateWhitelist</key>
                                <string>https://domain.edu</string>
                                <key>AuthServerWhitelist</key>
                                <string>https://domain.edu</string> 
                            </dict>
                        </dict>
                    </array>
                </dict>
            </dict>
        </dict>
    </array>
</dict>
</plist>

View solution in original post

6 REPLIES 6

boberito
Valued Contributor

Managed Preferences are sort of a thing of the past I thought.

Have you tried using a custom Configuration Profile to do this? You can push preference settings for apps that way.

bpavlov
Honored Contributor

In this particular case, there's a bit of a difference in terminology. Google has two ways you can manage Chrome preferences. Through "Preferences" or "Policy". A "preference" is taken from a Master Preferences file and enforced ONCE only allowing the user to make changes as they wish. A "policy" is enforced ALWAYS and will supersede any "preference" you may have set. So if he were to use a policy, regardless if the profile were set to manage only ONCE, it would enforce it ALWAYS (at least from reading their documentation that's what I understand).

Good resources on this are:
http://www.chromium.org/administrators/policy-templates
http://www.chromium.org/administrators/policy-list-3
http://www.chromium.org/administrators/configuring-other-preferences
http://krypted.com/mass-deployment/deploying-and-managing-google-chrome-the-rough-guide/

As to the question at hand, it looks like you have a curly quote rather than a straight quote towards the end:

},
  "first_run_tabs" : [
    "http://domain.com/“

I recommend using a text editor like TextWrangler. Avoid TextEdit. Still that's not the error in your Master Preferences file. I can't take a look at it now, I tried briefly but there's other work I need to get done. But I recommend that you do the following. Add one preference and see if it applies. If it works, great, move to the next preference. If it doesn't, do some research on whether it needs an additional preference to go along with it. It's an iterative process and a lot of trial and error but eventually yoy will find what works and what doesn't. Check the links above. I just did this over the weekend and managed to get a lot of ~/Application Support/Google folders in the trash just through the trial and error process. But I got something that works.

Here's what I got working:

{ 
  "homepage" : "http://www.yahoo.com", 
  "homepage_is_newtabpage" : false, 
  "browser" : { 
    "show_home_button" : true,
    "check_default_browser" : false
  },
  "session" : {
    "restore_on_startup" : 4,
    "urls_to_restore_on_startup" : [
      "http://www.yahoo.com"
    ]
  },
  "bookmark_bar" : { 
    "show_on_all_tabs": true
  }, 
  "sync_promo" : {
    "show_on_first_run_allowed": false
  },
  "distribution" : {
    "disableprintpreview": true,
    "showappsshortcutinbookmarkbar": false,
    "importbookmarks": false,
    "importhistory": false,
    "importhomepage": false,
    "importsavedpasswords": false,
    "importsearchengine": false,
    "importautofillformdata": false,
    "import_bookmarks_from_file": "/Library/Google/chrome_bookmarks.html",
    "skip_first_run_ui": true,
    "suppress_first_run_bubble": true,
    "hidewebstorepromo": false,
    "hidewebstoreicon": false,
    "cloudprintoroxyenabled": false,
    "cloudprintsubmitenabled": false,
    "make_chrome_default": false,
    "proxymode": "system"
  }
}

Good luck!

alexk
New Contributor III

for the same reason boberito said, we dont deploy it as a managed pref. instead we use that same code but keep it as a shell script in the jss. we deploy chrome in our image configs and as a self service policy, so we add the script to the image configs and the SS policy. it has been working well for us from mavericks to yosemite

timlarsen
Contributor

I have had personally had zero success using the Master Preferences file. I would recommend @boberito's solution and create a custom Configuration Profile manifest that enforces once, or for a less fancy solution appropriate for newly imaged machines, just manually configure chrome while using Composer and be sure the DMG is set to FUT and FEU. Not as best-practice but it will work.

Look
Valued Contributor III

Chrome Master Preferences work great once you have them working.
The biggest issue is the file has to be perfect or it scraps the whole thing and nothing gets managed, one comma in the wrong place for example BAM! nothing all setting removed.
Start with the vanilla known to work file available from Google, ensure it's working, then add your settings a few at a time making sure it sticks each time.

Oh yeah and as mentioned earlier use something like Textwrangler that really is plain text and doesn't do anything funny to the file in the process of formating it.

Poseiden951
Contributor

Used a mobileconifg file, much easier than the Master Preferences file and students can't change it!

edit: Everyone, please use TextWrangler. Saved me a headache!

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PayloadIdentifier</key>
    <string>com.schoolname.profile.chrome</string>
    <key>PayloadRemovalDisallowed</key>
    <true/>
    <key>PayloadScope</key>
    <string>System</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>2015-04-20-6-20</string>
    <key>PayloadOrganization</key>
    <string>school name here</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
    <key>PayloadDisplayName</key>
    <string>Google Chrome Policy</string>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadType</key>
            <string>com.apple.ManagedClient.preferences</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>PayloadIdentifier</key>
            <string>com.normandale</string>
            <key>PayloadUUID</key>
            <string>121-qasd</string>
            <key>PayloadEnabled</key>
            <true/>
            <key>PayloadDisplayName</key>
            <string>Custom: (com.google.Chrome)</string>
            <key>PayloadContent</key>
            <dict>
                <key>com.google.Chrome</key>
                <dict>
                    <key>Forced</key>
                    <array>
                        <dict>
                            <key>mcx_preference_settings</key>
                            <dict>
                                <key>AutoFillEnabled</key>
                                <false/>
                                <key>DefaultBrowserSettingEnabled</key>
                                <false/>
                                <key>BookmarkBarEnabled</key>
                                <true/>
                                <key>HideWebStorePromo</key>
                                <true/>
                                <key>HomepageIsNewTabPage</key>
                                <false/>
                                <key>HomepageLocation</key>
                                <string>http://domain.edu</string>
                                <key>PasswordManagerEnabled</key>
                                <false/>
                                <key>RestoreOnStartup</key>
                                <integer>0</integer>
                                <key>ShowHomeButton</key>
                                <true/>
                                <key>DeviceAutoUpdateDisabled</key>
                                <true/>
                                <key>SyncDisabled</key>
                                <false/>
                                <key>DefaultNotificationsSetting</key>
                                <integer>2</integer>
                                <key>ImportAutofillFormData</key>
                                <false/>
                                <key>ImportBookmarks</key>
                                <false/>
                                <key>ImportHistory</key>
                                <false/>
                                <key>ImportHomepage</key>
                                <false/>
                                <key>ImportSearchEngine</key>
                                <false/>
                                <key>ImportSavedPasswords</key>
                                <false/>
                                <key>AuthNegotiateDelegateWhitelist</key>
                                <string>https://domain.edu</string>
                                <key>AuthServerWhitelist</key>
                                <string>https://domain.edu</string> 
                            </dict>
                        </dict>
                    </array>
                </dict>
            </dict>
        </dict>
    </array>
</dict>
</plist>