[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: autofs and OpenLDAP integration

On Tue, Jul 24, 2001 at 12:06:05PM +0200, Jehan PROCACCIA wrote:
> ONE LAST QUESTION (arg !!), can I move /etc/auto.master in ldap

Yes, but it takes a bit of work.  In a nutshell, you migrate your
auto.master map into your directory in the same way you migrated
auto.home.  From there, the trick is to get the autofs init script to
look in your directory for the information it needs.

One way to do this is to dump the information from the directory to a
local file at boot-time using ldapsearch and to use some shell script
magic to convert the data into the right format.

Another way to do it is to hack the init script so that it "knows" how
to look for data in a directory, calling ldapsearch or a similar helper
in much the same way it uses ypcat to pull an auto.master map from an
NIS server.  We decided to go this route, and since no hard-coded
combination of using files, NIS, and LDAP could make everyone happy
(something which we've found out the hard way), we hacked in a primitive
form of support for parsing the automount: line in /etc/nsswitch.conf.

I've put the patch for the init script and the source for the helper it
uses, in http://people.redhat.com/nalin/autofs/.