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  >

KB-3131: How to set a screensaver on Mac OS X via Group Policy

Mac & PC Management Service ,  

12 April,16 at 11:08 AM

Applies to: All versions of Centrify DirectControl on Mac OS X 10.6 and above.


Is there a way to specify which screensaver to use on Mac systems via group policy?


  • 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 custom scripts.
  • To set the screensaver to a specific slideshow screensaver (for OS X 10.8 and later), please see the following KB:
  • This workaround does NOT prevent the user from changing the screensaver while they are logged in, but any changes will be reset back to the GP values once the command is run again at the next login.
    • If the Screensaver Preferences need to be locked out altogether, then the following GPs can be used: 
    • User Configuration / Centrify Settings / Mac OS X Settings / System Preferences Settings / 
  • Remember that these commands will only apply if the screensaver is already installed on the Mac.

There is no specific group policy to select a specific screensaver since different versions of OS X may come with different screensavers loaded (in addition to user-installed screensavers).

However if it is definitely known that a desired screensaver is already installed on the target Mac systems, then the following steps can be used to make sure it is enabled at each login:
  1. On a "template" Mac, open the System Preferences and enable the desired screensaver.
  2. Open the Terminal and run the command: 
    • defaults -currentHost read moduleDict 
  3. This will return the properties of the currently selected screensaver.
    • For example if the "Flurry" screensaver is selected, then the output will be:
    • $ defaults -currentHost read moduleDict 
    •    moduleName = Flurry
    •    path = "/System/Library/Screen Savers/Flurry.saver"; 
    •    type = 0
    • }

      User-added image
  4. The returned values can then be noted down and be used to set the screensaver from the command-line:
    • defaults -currentHost write moduleDict -dict moduleName "Flurry" path "/System/Library/Screen Savers/Flurry.saver" type "0"
  5. (Optional - please see the Notes disclaimer above)
    • Open the attached login script for editing. (Don't use Windows Notepad, use a UNIX-capable text editor instead, such as Notepad++)
    • Change the variables to match the values from Step 3 above.
    • Save the script to the following folder on the AD server:
      • \\ [domain] \SYSVOL\ [domain] \scripts\

        User-added image
  6. Enable the GP at: 
    • User Configuration / Centrify Settings / Mac OS X Settings / Scripts / "Specify multiple login scripts" 
      • Enter the filename of the script only:
      • The "Parameters" field can be left blank.

        User-added image

  7. To allow the GP to take affect immediately, go to the Mac, open up Terminal and run the command:
    • adgpupdate
  8. Logout and log back in as another AD user, look in the System Preferences to make sure the screensaver is now selected.
    • (The command from Step 2 could also be run as a confirmation that the settings have been applied)


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