Living with Lucid: NIS/Autofs… Again.

I love Debian.  I think Ubuntu is the best end-user Debian-based Linux distribution going.  Their innovative Netbook interface is fabulous.   However, having spent more time recently with RHEL, I can still clearly see that Ubuntu is focusing first and foremost on the end-user experience.  I’m trying to shoehorn it into a more corporate, controlled environment at Queen’s, and it’s a trick sometimes.

Case in point, NIS and Autofs.  A mainstay of legacy Unix shops, including ours.  NIS and Autofs startup have been broken in different ways with each Ubuntu LTS that I’ve dealt with.

In 10.04, the problem is that Autofs has been migrated to the new upstart startup mechanism and nis hasn’t.  This means that Autofs starts before NIS.  The problem with this is that NIS provides Autofs with automount maps.

So, on startup, you can log in with NIS but your home directly isn’t automounted, because autofs isn’t able to read the NIS maps.

This bug is logged.  My experience with Ubuntu releases would suggest that they won’t fix it.  Luckily, there’s a pretty easy workaround.  All you need to do is restart autofs again after NIS starts.  Do this by adding the following to /etc/rc.local:

# BH 2010 – NIS starts after autofs, rendering it useless.
# This is a hackish workaround.
/etc/init.d/autofs restart
exit 0
%d bloggers like this: