Mac OS X Server

Missing Option w/ OD Presets

When you are using a preset with Open Directory, it will copy a number of settings from a template, or preset, that you have created. But the preset will not keep the managed preferences. But you can copy the managed preferences you have defined.

I know that this has been covered before by a few different people, but it has mostly been for Local MCX or other types of uses. But if you are using Open Directory and you want to create a template, here’s what I do. Once I’ve configured a group’s managed preferences as I want them, I will save the group in Workgroup Manager and then open a terminal window. Assuming that you are working from the Open Directory master, that your Open Directory administrative account is called diradmin and that a computer group you are using as the template is called templatecompgroup you could use the following command to export tamplategroup’s Managed Preferences:

dscl -u diradmin /LDAPv3/127.0.0.1 mcxexport /ComputerGroups/templatecompgroup -o /Users/diradmin/Desktop/export.plist

This will create a property list called export.plist on the desktop of your diradmin user. You can then use the following command to import that into another ComputerGroup (in this case called myothergroup):

dscl -u diradmin /LDAPv3/127.0.0.1 mcximport /ComputerGroups/myothergroup /Users/diradmin/Desktop/export.plist

There are lots of other cool uses for mcximport and mcxexport, but if you have a lot of groups that use a lot of managed preferences and you have enough subtle differences between them that you don’t want to nest them within one big group, this can be a great strategy to get a lot of work done fairly quickly!