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:

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

About these ads
Local MCX and Lion

14 thoughts on “Local MCX and Lion

  1. 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.

  2. Anonymous says:

    I have been using this technique for a while on 10.6 without issue. However, I recently started to migrate my settings to 10.7 and noticed the MCXCCacheGraph error was back in the log, even when I am using /Local/MCX for my settings. Any ideas?

    1. I don’t see MCXCCacheGraph errors on my Lion machines. Are you sure you don’t have a local computer object in /private/var/db/dslocal/nodes/Default/computers/ ?

      1. Anonymous says:

        I think something was being cached somewhere, as I did not get the error when I tried it again on another system. When I renamed my ‘dslocal’ computer object to something new, the error continued to refer to the old object name. Thanks.

        Any tips on deploying the /Library/Preferences/OpenDirectory/Configurations/Search.plist file to other 10.7 systems? It seems to contain a UUID, so I may need to switch to scripting it instead of just packing the files like I did in 10.6. Thanks again.

      2. Anonymous: I have always scripted this for both 10.6 and 10.7. Here is the part of my script that modifies the search list in 10.7:

        sudo /usr/bin/dscl /Search -create / SearchPolicy CSPSearchPath
        sudo /usr/bin/dscl /Search -create / CSPSearchPath /Local/Default /Local/MCX

        Compare that with 10.6, which also includes /BSD/local:

        sudo /usr/bin/dscl /Search -create / SearchPolicy CSPSearchPath
        sudo /usr/bin/dscl /Search -create / CSPSearchPath /Local/Default /BSD/local /Local/MCX

      3. I’ve seen no particular issues in my environment by installing a preconfigured /Library/Preferences/OpenDirectory/Configurations/Search.plist file.

Comments are closed.