Mac OS-X Snow Leopard breaks NIS Automount

I just had to upgrade the Mac server which I had previously set up as a NIS/Automount client, and found that suddenly automount no longer works right. It looks like this is genuinely broken in the new automountd, but of course I can’t tell for sure without source code access.

In an earlier post I detailed how to set up a Leopard server as a NIS client with automount. That procedure required editing a couple files in the /etc/ directory. The upgrade to Snow Leopard replaced those files (auto_master and autofs.conf) with new files, wiping out my changes. It should be easy enough to just put the changes back, right? Wrong.

Setting the “resvport” option in autofs.conf works fine, as before, to get the automountd to use reserved ports so it can mount NFS filesystems from non-mac servers.

The problem is /etc/auto_master. In my previous instructions I had to simply change “+auto_master” to “+auto.master” to get automountd to load the NIS auto.master map to pick up all the other auto-maps. Well, making that change in Snow Leopard DOES NOT WORK. The automount daemon does not load the NIS auto.master map, so nothing works.

In my case I need this machine to see only two direct maps, auto.home and auto.project, so I modified the /etc/auto_master file to reference them directly as if they were local:

#
# Automounter master map
#
/home            auto_home    -nobrowse,hidefromfinder
/project        auto_project    -nobrowse,hidefromfinder

Then edited the two files /etc/auto_home and /etc/auto_project:

/etc/auto_home:

#
# Automounter map for /home
#
+auto.home    # Use directory service

/etc/auto_project:

#
# Automounter map for /project
#
+auto.project    # Use directory service

Those two direct maps pull in the NIS maps, and both work. After making those changes run ‘automount -vc’ as root to tell automountd to relaod its maps. I spoke with Apple support, and while they were friendly the response was that one has to pay them $695 in order to open a support case on something which is outside their normal support scope, whatever that is. Since I have a workaround I chose to just file bug feedback at http://www.apple.com/feedback/server.html.

Also changed in Snow Leopard is the Directory Utility, which no longer lives in the Applications->Utilities folder. Now it lives under a link in System Preferences, Accounts, there is a button on the middle right side of the pane to get to the Directory Utility, which at first glance appears to be about the same as in Leopard 10.5.

4 Comments

  1. Ben Davis:

    Thanks for the post. Same problem here. Upgraded last week and now my direct maps stopped working. Instead of being able to just reference the master map I had to make a copy of it. So instead of /etc/auto_master looking like this:

    +auto_master

    It now looks like this:

    /hosts -hosts -nobrowse,hidefromfinder,nosuid
    /home /etc/auto_home -nobrowse,hidefromfinder
    /- /etc/auto_direct

    And the automounter works like it used to.

  2. Jakub Krajcovic:

    Spot on! I noticed this exact same problem with Snow Leopard client, and this is going to be a huge problem for us… Our company relies heavily on the automounter functionality and not using auto.master is frankly not an option.

    I’m talking to Apple Australia to see if we can do something about this, and if not, we’re sticking with 10.5…

  3. Thomas A. Fine:

    I swear this was working for me in 10.6.1 (with auto_master not auto.master, I’ve never had to change “_” to a “.”, even though the actual NIS map is with a dot). But in 10.6.2 I’m definitely seeing this as broken.

    I had it in mind to just do it the hard way and replicate the data in auto.master in local files. So I created the relevant entries in /etc/auto_master. But I did NOT create the actual local files with the redirects to the specific NIS maps. For some reason I restarted autofs in this mid-state, and IT WORKED.

    What this tells me is that it is correctly trying to get data from the auto.master map, but it is not using this to create the mount points for the automounter. So
    the dummy lines create the mount points and the master map fills in the data. Still sucks, but it points to where the bug lies.

    Related to this, I’ve noticed that browsing of automount points, which worked under leopard, is not working for me under snow leopard.

    On the upside, in 10.6.2 it looks like replicated mount points are finally handled correctly (of at least in some way that functions, whether it is correct or not).

    tom

  4. Harald Fricke:

    Well, in 10.6.3 everything works for me as expected (e.g. as in 10.5.x). I followed the steps in http://www.jeff.com/2009/mac-os-x-server-as-a-nis-client-with-automount/ to set up the NIS binding. Now the default /etc/auto_master pulls auto.master from NIS, no need to change “_” to a “.” in the maps.

Leave a comment