Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-2785: How to set the homepages and bookmarks of Safari and Chrome using Group Policies.

Centrify Identity Service, Mac Edition ,  

12 April,16 at 11:11 AM

Applies to: Centrify DirectControl on Mac OS X 10.6 and higher.


Question:

Is it possible to have the homepages and bookmarks of Safari and Chrome on OS X be controlled via GP?


Answer:

Safari and Chrome store their configuration files and bookmarks in various locations in the user's ~/Library/ folder on the Mac. 
It is possible to have the desired settings be managed using a combination of group policies: 
  • The Safari homepage can be set using the "Import plist" GP.
  • The Chrome homepage can be set using the "Specify login script" GP.
  • The bookmarks for both can be set using the "Copy files" GP and then the "Specify login script" GP.


Notes: 
  • Once these GPs are in place, the bookmarks and homepages effectively become "Managed Settings"
    • This means that any edits the user makes to the bookmarks or preferences will be overwritten the next time the AD user logs in again.
    • There is currently no way to have both managed settings and user-settings co-exist at the same time.
       
  • The first load of Safari on an AD account which has never logged into the Mac before will always load the default Apple homepage first.
    • All subsequent loads of Safari will then load the desired GP-set homepage. 
       
  • The supplied login script will skip over the appropriate settings if it detects the associated files are not present. It will then continue to import any settings it does detect.
    • This means that if only the bookmarks are desired to be managed, then it is safe to skip the Preference steps in this KB (and vice versa).
    • If Chrome is not going to be used, then just skip the Chrome files completely.
       
  • The scripting hints provided in this KB are provided as a proof-of-concept only. 
  • Centrify Support does not cover custom-scripting - please contact Centrify Professional Services for further assistance with scripts.

Steps:
  1. Configuring Safari (Go straight to Step 2. if only Chrome will be used)
    • On a "template" Mac, open Safari and set the homepage and bookmarks to the desired configuration.
    • Close down Safari and copy out the following two files to the Mac desktop:
      • ~/Library/Preferences/com.apple.Safari.plist
      • ~/Library/Safari/Bookmarks.plist
    • Tip: A fast way to do this is with Terminal commands:
      • cp ~/Library/Safari/Bookmarks.plist ~/Desktop/
    • Use a plist editor program (such as Pref Setter) and open up the com.apple.Safari.plist on the desktop.
    • Remove all non-essential keys (make sure to keep the the HomePage key) and save the plist.
       
    • Note: Although most simple boolean and integer key entries could also be kept and managed, it is recommended to remove any keys that use unique identifiers, dates and timings to ensure reliable compatibility of this plist between different versions of Safari. Attempting to import the whole Safari plist could result in unexpected side-effects for Safari users.
       
    • The following exported plist has been attached to this KB as an example:

      User-added image
       
    • Copy both plist files over to the AD server and save them to location (Create the plist folder if it does not already exist): 

      \\ [domain] \SYSVOL\ [domain] \plist\

      User-added image

       
  2. Configuring Chrome (Go straight to Step 3. if Chrome will not be used)
    • Similar to Safari, open Chrome on a "template" Mac and set the homepage and bookmarks to the desired configuration.
    • Close down Chrome and copy out the following two files to the Mac desktop:
      • ~/Library/Application Support/Google/Chrome/Default/Preferences
      • ~/Library/Application Support/Google/Chrome/Default/Bookmarks
    • Note: The versions of Chrome being managed MUST match the version of Chrome on the template Mac that the Preference file comes from. 
    • Copying over the Preference files from different versions of Chrome may have unexpected side effects for the Chrome user.
       
    • Create the folder on the AD server and copy both files into the location:

      \\ [domain] \SYSVOL\ [domain] \Chrome\

      User-added image

       
  3. Setting up the login script
    • Save the attached login script onto AD server into the location:

      \\ [domain] \SYSVOL\ [domain] \scripts\

      User-added image

       
  4. Configure the group policies as shown:
    • User Configuration / Centrify Settings / Mac OS X Settings / Import Settings / "Import plist files"

      User-added image

       
    • User Configuration / Centrify Settings / Mac OS X Settings / Scripts / "Specify login script"

      User-added image

       
    • Computer Configuration / Centrify Settings / Common UNIX Settings / "Copy files"
    • For all three files, make sure to set the destination as: /tmp/

      User-added image

       
  5. Once all GPs are set up, open the Terminal on the Mac and run the command:
    • adgpupdate
  6. Logout and log as an AD user to test both Safari and Chrome.
  • Remember that AD users logging into the Mac for the first time may only see the settings be applied after their second login.
  • If any of the settings are not working correctly, try adjusting and recreating the preferences/bookmarks files from the template Mac.
Attachments:

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.

Related Articles

No related Articles