On Tue, 2007-11-27 at 14:37 -0700, Craig White wrote:
> On Thu, 2007-11-22 at 15:53 +0900, Ian Kent wrote:
> > On Wed, 2007-11-21 at 16:42 -0700, Craig White wrote:
> > > On Tue, 2007-11-20 at 11:13 -0700, Craig White wrote:
> > > > because of the discussion on auto home via LDAP, I thought I would try
> > > > to implement...
> > > > 
> > > > according to here...
> > > > https://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Deployment_Guide/s2-nfs-config-autofs-LDAP.html
> > 
> > Also be aware that there is a problem with the RHEL 5.1 kernel and you
> > will need to either update to revision 55.el5 or the z-stream revision
> > 53.1.3.el5 or above or or apply the patch referred to in bug
> > https://bugzilla.redhat.com/show_bug.cgi?id=371341.
> > 
> > Ummm .. I think that's about it.
> > I bet I've made some mistakes or left something out.
> > Anyway, have a try and let me know how you go.
> ----
> OK feeding back...(this is a Fedora 8 client)
> # rpm -q autofs
> autofs-5.0.2-16.x86_64
> # uname -a
> Linux dell-320-3.tobyhouse.com 2.6.23.1-49.fc8 #1 SMP Thu Nov 8 22:14:09
> EST 2007 x86_64 x86_64 x86_64 GNU/Linux
> 
> server is RHEL
> # uname -a
> Linux srv1.tobyhouse.com 2.6.18-8.1.4.el5 #1 SMP Fri May 4 22:15:13 EDT
> 2007 i686 i686 i386 GNU/Linux
> 
> Temporarily using standard autofs to demonstrate (Fedora)...
> 
> tail -n 1 /etc/auto.master
> /home/storage           /etc/auto.misc

This isn't the full story.
Do you have a line "+auto.master" in the master map?

> 
> tail -n 2 /etc/auto.misc
> users                -fstype=nfs srv1.tobyhouse.com:/home/storage/users
> files                -fstype=nfs srv1.tobyhouse.com:/home/storage/files
> 
> # grep automount /etc/nsswitch.conf
> automount:  files ldap

If you don't have a line "+auto.master" in /etc/auto.master the you need
to remove "files" from this line at least, and possibly
remove /etc/auto.master.

Better to just put the plus line in /etc/auto.master, as is the case
with the installed default.

> 
> autofs nfs mounts work fine.
> 
> now commenting out those above lines in /etc/auto.master
> and /etc/auto.misc (but leaving /etc/nsswitch.conf alone)
> 
> adding to /etc/ldap.conf
> # grep automount /etc/ldap.conf
> nss_base_automount     \
> automountmapname=auto.master,dc=tobyhouse,dc=com?sub

Why are you using this?

I didn't say anything about this in my description.
The LDAP libraries don't use this configuration file either.

In fact autofs doesn't use nss_ldap at all.

Defining the map container as described in my mail, which is required
anyway, is sufficient for autofs to work out the base dn, you don't need
to define it.

But there have been some corrections in this area, see below.

> 
> non-commented lines in /etc/sysconfig/autofs
> DEFAULT_MAP_OBJECT_CLASS="automountMap"
> DEFAULT_ENTRY_OBJECT_CLASS="automount"
> DEFAULT_MAP_ATTRIBUTE="automountMapName"
> DEFAULT_ENTRY_ATTRIBUTE="automountKey"
> DEFAULT_VALUE_ATTRIBUTE="automountInformation"
> AUTH_CONF_FILE="/etc/autofs_ldap_auth.conf"
> 
> Then restart autofs and...
> 
> doing ldapsearch from fedora 8 client seeking to automount (and
> deliberately leaving off command line items to demonstrate accuracy
> of /etc/openldap/ldap.conf)

Since your using Fedora 8 for this you should update to the latest
release of autofs. That's revision 17 which should be in
updates/testing.

> 
> # ldapsearch -x '(objectclass=automount)'

And this isn't the whole story either.

What about listing all the entries you should have with something like:

ldapsearch -x '(|(objectclass=automount)(objectclass=automountMap))'

For example where is the master map container like:

dn: automountMapName=auto.master,dc=tobyhouse,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto.master

> 
> ...some clippage...
> # /home/storage, auto.master, tobyhouse.com
> dn:
> description=/home/storage,automountMapName=auto.master,dc=tobyhouse,dc=com
> objectClass: top
> objectClass: automount
> automountInformation: auto.home
> automountKey: /home/storage
> description: /home/storage

Looks OK.

Would be a valid master map entry for /home/storage for LDAP map
auto.home if above container was present.

> 
> # users, auto.home, tobyhouse.com
> dn: automountKey=users,automountMapName=auto.home,dc=tobyhouse,dc=com
> objectClass: automount
> automountInformation: srv1.tobyhouse.com:/home/storage/users
> automountKey: users

I advised you add "automountMapName: auto.home" to these entries,
especially since it's in the dn. Otherwise, looks like a valid entry for
the LDAP map auto.home for key users.

But where is the container entry for the the map entries like:

dn: automountMapName=auto.home,dc=tobyhouse,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto.home

> 
> # files, auto.misc, tobyhouse.com
> dn: automountKey=files,automountMapName=auto.misc,dc=tobyhouse,dc=com
> objectClass: automount
> automountKey: files
> automountInformation: srv1.tobyhouse.com:/home/storage/files

What's this?

There's no master map entry or map container for auto.misc.

And then ....

> 
> # /home/storage/files, auto.master, tobyhouse.com
> dn:
> description=/home/storage/files,automountMapName=auto.master,dc=tobyhouse,
>  dc=com
> objectClass: top
> objectClass: automount
> automountInformation: auto.misc
> description: /home/storage/files
> automountKey: users
> 
> # /home/storage/users, auto.home, tobyhouse.com
> dn:
> automountKey=/home/storage/users,automountMapName=auto.home,dc=tobyhouse,d
>  c=com
> automountInformation: srv1.tobyhouse.com:/home/storage/users
> automountKey: /home/storage/users
> objectClass: automount

What is this meant to do?

For a start a key that defines users for the autofs indirect
map /home/storage is present above. In addition the map auto.home is an
indirect map not a direct map so the map key here is invalid.

> 
> # /home/storage/files, auto.misc, tobyhouse.com
> dn:
> automountKey=/home/storage/files,automountMapName=auto.misc,dc=tobyhouse,d
>  c=com
> automountInformation: srv1.tobyhouse.com:/home/storage/files
> automountKey: /home/storage/files
> objectClass: automount

Same again.

> 
> but autofs mounts never work

It's clear you didn't pay sufficient attention to my mail.
Go back and read it again, carefully.

Ian


_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to