Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
autofs (autofs-ldap-auto-master) not pulling map [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dfelicia
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 281
Location: Southwestern Connecticut

PostPosted: Mon Jul 31, 2006 1:08 pm    Post subject: autofs (autofs-ldap-auto-master) not pulling map [SOLVED] Reply with quote

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:
Code:

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:
Code:

host myhost.abc.com
base dc=abc,dc=com
ssl no
pam_password crypt


LDIF for auto.master:
Code:

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:
Code:

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:
Code:

/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
Back to top
View user's profile Send private message
dfelicia
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 281
Location: Southwestern Connecticut

PostPosted: Thu Sep 28, 2006 11:12 pm    Post subject: Reply with quote

Finally solved this. just had to change ldap_map_key='ou' to ldap_map_key='automountMapName'.
Back to top
View user's profile Send private message
BarBaar
n00b
n00b


Joined: 19 Dec 2006
Posts: 7

PostPosted: Mon Feb 19, 2007 8:08 pm    Post subject: Reply with quote

Major kick :P

Which schema did you use?

Gentoo's autofs comes with autofs.schema (tadaa :P ).. but Red Hat uses automountMap.. I think you used the last one.. but where did you find it?
Back to top
View user's profile Send private message
dfelicia
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 281
Location: Southwestern Connecticut

PostPosted: Tue Feb 20, 2007 2:44 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
BarBaar
n00b
n00b


Joined: 19 Dec 2006
Posts: 7

PostPosted: Tue Feb 20, 2007 5:19 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
dfelicia
Apprentice
Apprentice


Joined: 11 May 2005
Posts: 281
Location: Southwestern Connecticut

PostPosted: Tue Feb 20, 2007 5:35 pm    Post subject: Reply with quote

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."
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum