Local MCX and Lion
If you’ve implemented Local MCX on your Leopard and/or Snow Leopard machines, you’ll be wondering if it works on Lion, too.
Some earlier posts on Local MCX:
- http://managingosx.wordpress.com/2010/03/12/yet-again-with-the-local-mcx/
- http://managingosx.wordpress.com/2010/03/07/local-mcx-update/
- http://managingosx.wordpress.com/2010/03/07/mcx-in-non-default-local-nodes/
- http://managingosx.wordpress.com/2008/02/07/mcx-dslocal-and-leopard/
The answer is yes – Local MCX works in Lion. There is one minor issue, though: if you are putting your local MCX version in an alternate local directory node (like /Local/MCX), you’ll need to know that Lion is a bit pickier about the contents of the directories of alternate local nodes.
If opendirectoryd on Lion doesn’t like your MCX node, it might look something like this:
> dscl /Local/MCX list /
Data source (/Local/MCX) is not valid.
It turns out this is pretty easy to remedy: Lion’s opendirectoryd requires that a local directory node have at the minimum a “users” and a “groups” subdirectory. So if either of these subdirectories are missing, simply create them and restart opendirectoryd (killall opendirectoryd). dscl should now recognize the node:
> mkdir -p /private/db/dslocal/nodes/MCX/users
> mkdir -p /private/db/dslocal/nodes/MCX/groups
> killall opendirectoryd
> dscl /Local/MCX list /
AFPUserAliases
Aliases
Automount
AutomountMap
ComputerGroups
ComputerLists
Computers
Config
Ethernets
Groups
Hosts
Mounts
NetGroups
Networks
People
PresetComputerGroups
PresetComputerLists
PresetComputers
PresetGroups
PresetUsers
Protocols
RPC
Services
SharePoints
Users
August 20, 2011 at 9:26 am
Shouldn’t it be
mkdir -p /var/db/dslocal/nodes/MCX/users
mkdir -p /var/db/dslocal/nodes/MCX/groups
instead of /private/db/…
August 20, 2011 at 9:43 am
Crap.
We’re both wrong. It should be
/private/var/db
Though just /var/db will work.
November 15, 2011 at 6:20 am
I also discovered that I needed to modify my custom search list as /BSD/local isn’t included (at least from what I can see) in 10.7. I updated it thusly:
sudo dscl /Search -create / SearchPolicy CSPSearchPath
sudo dscl /Search -create / CSPSearchPath /Local/Default /Local/MCX
Without updating it, dscl threw an -14008 (eDSNodeNotFound) error and MCX settings would not apply as /Local/MCX was never added to the search path.
November 15, 2011 at 8:21 am
I had to do something similar for Lion as well. Thanks for mentioning it!
December 19, 2011 at 10:30 am
[...] preferences will perform just the same with this new/additional delivery method. I have used localMCX in Lion for Office2011 prefs without issue, and tested other Apple manually applying profiles with [...]