autofs5 + ldap
Hello!
I am having some issues with autofs5 + ldap configuration, I just can not seem to get autofs to read the auto_master map out of ldap. I have tried unsuccessfully using the "samples" and my previous configuration (autofs414 which does work with ldap). I tried to use the /etc/sysconfig/autofs config file paralleling the sample but using my ldap settings as well as using /etc/auto.master again using my ldap settings, both to no avail. I know the ldap settings are correct, I can search the ldap server without any issues and I am using it to authenticate (i.e. passwords).
If anyone could lend me a suggestion, I would be most grateful. TIA,
Phy
[root@b~]# cat /etc/auto.master dn: automountMapName=auto_master,ou=automount,ou=defaults,ou=sanjose,ou=services,o=cadence.com objectClass: top objectClass: automountMap automountMapName: auto_master #+auto.master [root@b ~]#
[root@b ~]# /usr/sbin/automount --version
Linux automount version 5.0.1
Directories:
config dir: /etc/sysconfig
maps dir: /etc
modules dir: /usr/local/autofs501p1/lib/autofsCompile options:
ENABLE_IGNORE_BUSY_MOUNTS WITH_LDAP
[root@b ~]# ldapsearch -x -b 'ou=default,ou=region,o=test.com' automountMapName=auto_master
version: 2
#
# filter: automountMapName=auto_master
# requesting: ALL
#
# auto_master, automount, Default, region, test.com
dn: automountMapName=auto_master,ou=automount,ou=Default,ou=region,ou=test.com
objectClass: top
objectClass: automountMap
objectClass: nisMap
automountMapName: auto_master
nisMapName: auto_master
# search result search: 2 result: 0 Success
# numResponses: 2
# numEntries: 1
[root@b ~]# uname -a
Linux host1.test.com 2.6.21.1 #1 SMP Wed May 9 08:54:29 PDT 2007 i686 athlon i386 GNU/Linux [root@b ~]#
____________________________________________________________________________________Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerQuoted 17 lines · Phy Prabab
Hello!
I am having some issues with autofs5 + ldap configuration, I just can not seem to get autofs to read the
auto_mastermap out of ldap. I have tried unsuccessfully using the "samples" and my previous configuration (autofs414 which does work with ldap). I tried to use the/etc/sysconfig/autofsconfig file paralleling the sample but using my ldap settings as well as using/etc/auto.masteragain using my ldap settings, both to no avail. I know the ldap settings are correct, I can search the ldap server without any issues and I am using it to authenticate (i.e. passwords).If anyone could lend me a suggestion, I would be most grateful. TIA,
Phy
Quoted 7 lines
[root@b~]# cat /etc/auto.master dn: automountMapName=auto_master,ou=automount,ou=defaults,ou=sanjose,ou=services,o=cadence.com objectClass: top objectClass: automountMap automountMapName: auto_master #+auto.master
Master map entries don't look like this.
In the samples directory look for auto.master.ldap for an example of an a file based ldap master map.
If you want the master map itself to be stored in LDAP look at the samples ldap-automount-* and ldap-nis-* for examples of what to store in LDAP for the various schema that you can use.
To be honest, if you just want to use only LDAP, it's much easier not to put any LDAP specific information in the map entries and ensure that /etc/nsswitch.conf has
automount: ldap
and use LDAP entries like the ones below. autofs will find the LDAP server and locate the entries for you as long as the ldap client configuration has which server to contact setup which is verified by using ldapsearch, as you have done.
The autofs default master map name is auto.master so be sure to use that at least until you have a working configuration.
This example (produced in LDIF format) assumes you have enabled the schema below in the autofs configuration by changing:
#MAP_OBJECT_CLASS="automountMap"
#ENTRY_OBJECT_CLASS="automount"
#MAP_ATTRIBUTE="ou"
#ENTRY_ATTRIBUTE="cn"
#VALUE_ATTRIBUTE="automountInformation"
to
MAP_OBJECT_CLASS="automountMap"
ENTRY_OBJECT_CLASS="automount"
MAP_ATTRIBUTE="ou"
ENTRY_ATTRIBUTE="cn"
VALUE_ATTRIBUTE="automountInformation"
Otherwise the internal system default schema is the old NIS schema.
For the master map, first the container object (this is used to work out the base dn for searches for map entries in this map):
dn: ou=auto.master,dc=bogus
objectClass: top
objectClass: automountMap
ou: auto.master
Then the master map entries themselves (in this case just one):
dn: cn=/ldap,ou=auto.master,dc=bogus
objectClass: automount
cn: /ldap
automountInformation: auto.indirect
Then the container for the corresponding master map entry above (again, this is used to work out the base dn for searches for map entries in this map):
dn: ou=auto.indirect,dc=bogus
objectClass: top
objectClass: automountMap
ou: auto.indirect
and the entries for the auto.indirect map itself:
dn: cn=bin,ou=auto.indirect,dc=bogus
objectClass: automount
cn: bin
automountInformation: budgie:/usr/local/bin
dn: cn=etc,ou=auto.indirect,dc=bogus
objectClass: automount
cn: etc
automountInformation: budgie:/usr/local/etc
dn: cn=lib,ou=auto.indirect,dc=bogus
objectClass: automount
cn: lib
automountInformation: budgie:/usr/local/lib
dn: cn=/,ou=auto.indirect,dc=bogus
objectClass: automount
cn: /
automountInformation: budgie:/usr/local/&
Quoted 53 lines
[root@b ~]#
[root@b ~]#
/usr/sbin/automount--versionLinux automount version 5.0.1
Directories:
config dir: /etc/sysconfig maps dir: /etc modules dir: /usr/local/autofs501p1/lib/autofsCompile options:
ENABLE_IGNORE_BUSY_MOUNTSWITH_LDAP[root@b ~]# ldapsearch -x -b 'ou=default,ou=region,o=test.com' automountMapName=auto_master
version: 2#
# filter: automountMapName=auto_master
# requesting: ALL
##
auto_master, automount, Default, region, test.com
dn:
automountMapName=auto_master,ou=automount,ou=Default,ou=region,ou=test.com
objectClass: top
objectClass: automountMap
objectClass: nisMap
automountMapName:auto_master
nisMapName:auto_master# search result search: 2 result: 0 Success# numResponses: 2
# numEntries: 1
[root@b ~]# uname -a
Linux host1.test.com 2.6.21.1 #1 SMP Wed May 9 08:54:29 PDT 2007 i686 athlon i386 GNU/Linux
[root@b ~]#______________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search.
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
==> On Sat, 12 May 2007 22:35:54 -0700 (PDT), Phy Prabab <[email protected]> said:
Phy> Hello!
Phy> I am having some issues with autofs5 + ldap configuration, I just Phy> can not seem to get autofs to read the auto_master map out of Phy> ldap. I have tried unsuccessfully using the "samples" and my Phy> previous configuration (autofs414 which does work with ldap). I Phy> tried to use the /etc/sysconfig/autofs config file paralleling Phy> the sample but using my ldap settings as well as using Phy> /etc/auto.master again using my ldap settings, both to no avail. Phy> I know the ldap settings are correct, I can search the ldap Phy> server without any issues and I am using it to authenticate Phy> (i.e. passwords).
Phy> If anyone could lend me a suggestion, I would be most grateful. Phy> TIA,
Phy> Phy
Phy> [root@b~]# cat /etc/auto.master
Phy> dn: automountMapName=auto_master,ou=automount,ou=defaults,ou=sanjose,ou=services,o=cadence.com Phy> objectClass: top
Phy> objectClass: automountMap
Phy> automountMapName: auto_master
Phy> #+auto.master
Autofs does not expect to find ldif in your /etc/auto.master. I'm guessing this was a last resort attempt. What did your configuration files look like under 4.1.x?
For now, try the following.
Make sure /etc/nsswitch.conf has this line for automount:
automount: ldap
And in /etc/sysconfig/autofs, you want to have this line:
MASTER_MAP_NAME="auto_master"
Now try starting the automounter. If this fails, please provide all of the information requested in the section entitled, "Filing bug reports," on my people page:
http://people.redhat.com/jmoyer
Thanks!
Jeff