# autofs (autofs-ldap-auto-master) not pulling map [SOLVED]

## dfelicia

My problem is that autofs does not pull auto.master from LDAP.  Looking at the init.d script, it calls /usr/lib/autofs/autofs-ldap-auto-master.  When I run that manually from a shell (with or without arguments), it returns nothing.  Doing the same from A RedHat box returns the map.

/etc/conf.d/autofs:

```

ldap_mapname='auto.master'

ldap_map_oc='automountMap'

ldap_entry_oc='automount'

ldap_map_key='ou'

ldap_entry_key='cn'

ldap_value='automountInformation'

```

/etc/ldap.conf:

```

host myhost.abc.com

base dc=abc,dc=com

ssl no

pam_password crypt

```

LDIF for auto.master:

```

dn: automountMapName=auto.master, ou=xx,ou=yy,ou=zz,dc=abc,dc=com

objectClass: top

objectClass: automountMap

automountMapName: auto.master

dn: automountKey=\/net, automountMapName=auto.master, ou=xx,ou=yy,ou=zz,dc=abc,dc=com

automountKey: /net

objectClass: automount

objectClass: top

automountInformation: -hosts

cn: /net

dn: automountKey=\/nfshome, automountMapName=auto.master, ou=xx,ou=yy,ou=zz,dc=abc,dc=com

automountKey: /nfshome

objectClass: automount

objectClass: top

automountInformation: ldap:automountMapName=auto_nfshome,ou=xx,ou=yy,ou=zz,dc=abc,dc=com -rw,hard,intr,vers=3,rsize=32786,wsize=32786

cn: /nfshome

```

/etc/nsswitch.conf:

```

passwd:     files ldap

shadow:     files ldap

group:      files ldap

hosts:      files dns

services:   files ldap

networks:   files

protocols:  files ldap

rpc:        files

ethers:     files

netmasks:   files

bootparams: files

publickey:  files

automount:  ldap files

aliases:    files

sendmailvars:   files

netgroup:   files ldap

```

My workaround, for now, is to use a local auto.master that has this entry:

```

/nfshome ldap://myhost.abc.com/automountMapName=auto_nfshome,ou=xx,ou=yy,ou=zz,dc=abc,dc=com

```

I'd like to pull auto.master from LDAP so when ITS makes changes I get them.  (They only support RedHat, so I'm on my own for figuring this out.)Last edited by dfelicia on Thu Sep 28, 2006 11:12 pm; edited 1 time in total

----------

## dfelicia

Finally solved this.  just had to change ldap_map_key='ou' to ldap_map_key='automountMapName'.

----------

## BarBaar

Major kick  :Razz: 

Which schema did you use? 

Gentoo's autofs comes with autofs.schema (tadaa  :Razz:  ).. but Red Hat uses automountMap.. I think you used the last one.. but where did you find it?

----------

## dfelicia

I didn't set up the LDAP server, our IT dept. did.  It is Red Hat's commercial ($$) LDAP offering.  Not sure if they customized it, as it is used for Linux, HP-UX, AIX, and Solaris.

I can use ldapbrowser to look at it if there is a specific thing of interest you want me to post.

----------

## BarBaar

Hmm, wel.. I just found out that the schema you use is based on rfc2307bis  Here it is

But what I like so much about your config (and the one RH shows) is that you don't have to create an ldap-autofs entry for every user.

I have found enough references that do

But.. is the standard gentoo automounter compatible with rfc2307bis? Your posts before appear to prove this, can you confirm?

----------

## dfelicia

 *Quote:*   

> But.. is the standard gentoo automounter compatible with rfc2307bis? Your posts before appear to prove this, can you confirm?

 

Assuming my company is indeed using that schema (I can't confirm that part for you), then, yes.  All I changed was ldap_map_key, and everything "just works."

----------

