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
Mmmm .. interesting.
The first thing you need to do is decide which schema you will use.
Judging by the discussion here you want to use rfc2307bis.
The rfc2307.schema that you need doesn't seem to be in any package.
That's not very good as it's the schema I would recommend using for new
autofs deployments and it's the one we recommend in the page above.
I might add it to autofs but, at some point, there was a question about
the IDS used in the schema. For now I've attached it to this message.
> >
> ----
> OK - moving on, I now have this much going...
>
> # ldapsearch -x '(objectclass=automountMap)' -b 'dc=tobyhouse,dc=com'
> # extended LDIF
> #
> # LDAPv3
> # base <dc=tobyhouse,dc=com> with scope subtree
> # filter: (objectclass=automountMap)
> # requesting: ALL
> #
>
> # auto.master, tobyhouse.com
> dn: ou=auto.master,dc=tobyhouse,dc=com
> objectClass: automountMap
> objectClass: top
> ou: auto.master
>
> # auto.misc, tobyhouse.com
> dn: ou=auto.misc,dc=tobyhouse,dc=com
> ou: auto.misc
> objectClass: automountMap
> objectClass: top
You don't use the ou attribute when using rfc2307bis.
>
> # auto.home, tobyhouse.com
> dn: ou=auto.home,dc=tobyhouse,dc=com
> ou: auto.home
> objectClass: automountMap
> objectClass: top
>
> # search result
> search: 2
> result: 0 Success
>
> but I fall apart here and I can't see any support anywhere for
> autoMountMapName per the instructions...
>
> # ldapsearch -x '(automountMapName=*)' -b 'dc=tobyhouse,dc=com'
> # extended LDIF
> #
> # LDAPv3
> # base <dc=tobyhouse,dc=com> with scope subtree
> # filter: (automountMapName=*)
> # requesting: ALL
> #
>
> # search result
> search: 2
> result: 0 Success
>
> and not only can I not find it with an ldapsearch, I can't possibly
> create an entry with the ou=automountMapName because I can't locate any
> schema support for it...
>
> # grep -r automountMap /etc/openldap/schema/*
> /etc/openldap/schema/redhat/autofs.schema:objectclass
> ( 1.3.6.1.4.1.2312.4.2.2 NAME 'automountMap' SUP top STRUCTURAL
>
> # grep -r automountMapName /etc/openldap/schema/*
> # grep -r automountMapname /etc/openldap/schema/*
> #
Forget all this automountMapName is an attribute not a value.
>
> I can see in
> /usr/share/doc/autofs-5.0.1/ldap-automount-rfc2307-bis-auto.master
> that the entry is there but I can't find any schema support for creating
> entries with a dn that begins
>
> automountMapName= anything
>
> What is the clue piece that I am missing?
Use the schema attached.
It looks like the page above managed to get by me with mistakes, oops.
I'll have a try at describing the LDAP configuration for a simple
example setup. Maybe it will help.
You need to not load autofs.schema in order to use the rfc2307.schema (I
think, just from memeory).
In RHEL 5.1, autofs can't automatically detect the schema to use so you
need to set that in the autofs configuration located
in /etc/sysconfig/autofs. Just remove the comments against these lines:
DEFAULT_MAP_OBJECT_CLASS="automountMap"
DEFAULT_ENTRY_OBJECT_CLASS="automount"
DEFAULT_MAP_ATTRIBUTE="automountMapName"
DEFAULT_ENTRY_ATTRIBUTE="automountKey"
DEFAULT_VALUE_ATTRIBUTE="automountInformation"
The "DEFAULT_" prefix isn't required in later reversions but is accepted
as valid.
Ensure that /etc/nsswitch.conf has:
automount: files ldap
or
automount: ldap
The former is preferable because it will allow you to place local
entries in /etc/auto.master if you need to override entries in the
central master map for individual workstations. They would need to be
placed before the "+auto.master" entry to be effective.
Then you need to create a container for the master map, the master map
entries, a container entry for each map and then entries for each of the
maps.
For example, a container for the master map:
# auto.master, example.com
dn: automountMapName=auto.master,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto.master
Then the entries that belong to the master map.
Assuming we want to create a map called auto.home, one such entry could
be:
dn: description=/home,automountMapName=auto.master,dc=example,dc=com
objectClass: top
objectClass: automount
automountKey: /home
automountInformation: auto.home
description: /home
Next the container for auto.home:
dn: automountMapName=auto.home,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto.home
and the the entries for auto.home:
dn: automountKey=foo,automountMapName=auto.home,dc=example,dc=com
objectClass: automount
automountKey: foo
automountInformation: filer.example.com:/export/foo
and so on.
Note that the wildcard entry used in LDAP maps is different than in
other maps. For example:
dn: automountKey=/,automountMapName=auto.home,dc=example,dc=com
objectClass: top
objectClass: automount
automountKey: /
automountInformation: filer.example.com:/export/&
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.
Ian
attributeType ( 1.3.6.1.1.1.1.31
NAME 'automountMapName'
DESC 'automount Map Name'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE
X-ORIGIN 'user defined' )
attributeType ( 1.3.6.1.1.1.1.32
NAME 'automountKey'
DESC 'Automount Key value'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE
X-ORIGIN 'user defined' )
attributeType ( 1.3.6.1.1.1.1.33
NAME 'automountInformation'
DESC 'Automount information'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE
X-ORIGIN 'user defined' )
objectClass ( 1.3.6.1.1.1.2.16
NAME 'automountMap'
DESC 'Automount Map information'
SUP top STRUCTURAL
MUST automountMapName
MAY description
X-ORIGIN 'user defined' )
objectClass ( 1.3.6.1.1.1.2.17
NAME 'automount'
DESC 'Automount information'
SUP top STRUCTURAL
MUST ( automountKey $ automountInformation )
MAY description
X-ORIGIN 'user defined' )
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list