From mboxrd@z Thu Jan 1 00:00:00 1970 From: wengang wang Subject: Re: basedn in /etc/sysconfig/autofs Date: Thu, 06 Sep 2007 10:01:11 +0800 Message-ID: <46DF5F67.7030901@oracle.com> References: <46DE1128.2020109@oracle.com> <1188994602.3119.5.camel@raven.themaw.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1557272275571098684==" Return-path: In-Reply-To: <1188994602.3119.5.camel@raven.themaw.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autofs-bounces@linux.kernel.org Errors-To: autofs-bounces@linux.kernel.org To: Ian Kent Cc: autofs@linux.kernel.org This is a multi-part message in MIME format. --===============1557272275571098684== Content-Type: multipart/alternative; boundary="------------010307010606050407010809" This is a multi-part message in MIME format. --------------010307010606050407010809 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Ian, here is the exchangings: **** PLAKDAWA 07/31/07 04:41 pm **** In RHEL4 it was possible to set a "basedn" variable in the /etc/sysconfig/autofs file which served as a basedn for LDAP lookups performed by the automounter. However, this has been removed in RHEL5. This functionality is critical for us because we separate automounter maps by region, but look up accounts and groups in the entire directory. So different basedn are required for each of these lookups. Can this functonality please be restored? Thank you. ****** BBARBE 08/01/07 03:58 am **** /@ BASEDN was introduced in the following errata / /@ http://rhn.redhat.com/errata/RHBA-2006-0464.html/ /@ It is present in Update 4 and up/ ****** PLAKDAWA 08/13/07 10:47 am **** We set the autofs basedn using /etc/sysconfig/autofs. We do not use /etc/openldap/ldap.conf because this file is automatically edited by the redhat config tools authconfig and system-config-authentication. These tools setup identical basedn entries for the two files /etc/ldap.conf and /etc/openldap/ldap.conf. The /etc/sysconfig/autofs settings for us in RHEL AS4 are as follows: [porus@rattlebag ~]$ cat /etc/sysconfig/autofs # Define custom options in /etc/sysconfig/autofs # Use LOCALOPTIONS for defining variables, e.g. OSREL # Use DAEMONOPTIONS to define the unmount timeout # Define UNDERSCORETODOT as 1 to convert # auto_home to auto.home and auto_mnt to auto.mnt # Mount options, e.g. rsize=8192, should go in auto.master or # the auto_* map entry for a specific mount point # LOCALOPTIONS="" DAEMONOPTIONS="--timeout=60" LDAPAUTOMASTER="" # UNDERSCORETODOT changes auto_home to auto.home and auto_mnt to auto.mnt UNDERSCORETODOT=1 DISABLE_DIRECT=1 # Only source one master map if set to 1. This would mimic Sun behaviour. # The default is 0 to maintain backwards compatibility. ONE_AUTO_MASTER=0 # List of directories to be ghosted, separated by white space. GHOSTDIRS="" # Base DN to use when searching for the master map BASEDN=ou=sc,ou=ca,ou=na,dc=hyperion,dc=com ****** PLAKDAWA 08/14/07 02:06 pm **** Just to give you a little more information: Our automount schema is based on the "automountmapname", "automountkey" and "automountinformation" attributes. This works properly with the relevant settings in the /etc/sysconfig/autofs file on RHEL5 if the basedn is set manually in the /etc/openldap/ldap.conf file. However, since the openldap/ldap.conf file can be used by other applications, we don't want our automounter's basedn to depend on this. The LDAP attributes of the automount maps are as shown below: [porus@rattlebag ~]$ ldapsearch -LLL -x -b "ou=sc,ou=ca,ou=na,dc=hyperion,dc=com" "automountmapname=auto_nfshome" dn: automountMapName=auto_nfshome,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com objectClass: top objectClass: automountMap automountMapName: auto_nfshome [porus@rattlebag ~]$ ldapsearch -LLL -x -b "automountmapname=auto_nfshome,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com" "automountkey=plakdawa" dn: automountkey=plakdawa,automountMapName=auto_nfshome,ou=sc,ou=ca,ou=na,dc=h yperion,dc=com automountInformation: scfs3:/vol/vol2/homes/& automountKey: plakdawa objectClass: top objectClass: automount **** PLAKDAWA 08/14/07 02:12 pm **** I am not certain if the lab server will be reachable from your subnets. We are part of hyperion (was recently acquired by Oracle). Please try the /@ following IP address / /@ Name: labldap02.hyperion.com/ Address: 172.27.33.46 The LDAP basedn for all account lookups is "dc=hyperion,dc=com". The LDAP basedn for automount lookups is "ou=sc,ou=ca,ou=na,dc=hyperion,dc=com" **** WWG 08/15/07 12:34 am **** /@ yes, as you said, BASEDN set in /etc/sysconfig/autofs doesn't work./ /@ while, you can specify the auto master entry by add one line in to / /@ /etc/sysconfig/autofs/ /@ DEFAULT_MASTER_MAP_NAME="//172.27.33.46/automountmapname=auto_nfshome,ou=sc,ou/ /@ =ca,ou=na,dc=hyperion,dc=com"/ **** PLAKDAWA 08/20/07 11:46 am **** We have multiple automount maps in ou=sc,ou=ca,ou=na,dc=hyperion,dc=com. So should the DEFAULT_MASTER_MAP_NAME be set to the auto.master map? [porus@rattlebag ~]$ ldapsearch -LLL -x -b "ou=sc,ou=ca,ou=na,dc=hyperion,dc=com" "objectclass=automountmap" dn: automountMapName=auto_automnt,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com automountMapName: auto_automnt objectClass: top objectClass: automountMap dn: automountMapName=auto_master,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com automountMapName: auto_master objectClass: top objectClass: automountMap dn: automountMapName=auto.master,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com automountMapName: auto.master objectClass: top objectClass: automountMap dn: automountMapName=auto_scfs3,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com objectClass: top objectClass: automountMap automountMapName: auto_scfs3 dn: automountMapName=auto_scfs4,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com objectClass: top objectClass: automountMap automountMapName: auto_scfs4 dn: automountMapName=auto_nar200,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com objectClass: top objectClass: automountMap automountMapName: auto_nar200 dn: automountMapName=auto_nfshome,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com objectClass: top objectClass: automountMap automountMapName: auto_nfshome dn: automountMapName=auto_products,ou=sc,ou=ca,ou=na,dc=hyperion,dc=com objectClass: top objectClass: automountMap automountMapName: auto_products **** PLAKDAWA 08/20/07 11:51 am **** The other issue with the DEFAULT_MASTER_MAP_NAME is that providing the full URL, will prevent the failover to the secondary LDAP server should the one mentioned in the URL fail. Or is it possible to add secondary entries? over. thanks wengang. Ian Kent wrote: > On Wed, 2007-09-05 at 10:15 +0800, wengang wang wrote: > >> Hi, >> A custom complained that: >> //<== >> In RHEL4 it was possible to set a "basedn" variable in the >> /etc/sysconfig/autofs file which served as a basedn for LDAP lookups >> performed by the automounter. >> >> However, this has been removed in RHEL5. >> //<== >> It is true that setting it in /etc/openldap/ldap.conf is an alternative, >> > > No. > > >> the custom doesn't want do as that because /etc/openldap/ldap.conf is >> automatically edited by the redhat config tools authconfig and >> system-config-authentication. >> So I want to know for what the basedn is removed from >> /etc/sysconfig/autofs. I checked all the change logs and readmes in >> autofs-5.0.1, but didn't find basedn metioned. >> > > In version 5 the base dn is calculated, depending on how you specify the > map. > > Describe the problem and I'll try and give a sensible answer. > > Ian > > > -- Wengang Wang Member of Technical Staff Oracle Asia R&D Center Open Source Technologies Development Tel: +86 10 8278 6265 Mobile: +86 13381078925 --------------010307010606050407010809 Content-Type: multipart/related; boundary="------------080608040509010400010608" --------------080608040509010400010608 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by hera.kernel.org id l86EcOKa007560 Hi Ian,

here is the exchangings:

*** PLAKDAWA 07/31/07 04:41 pm ***
In RHEL4 it was possible to set a "basedn" variable in the
/etc/sysconfig/autofs file which served as a basedn for LDAP lookups
performed by the automounter.

However, this has been removed in RHEL5.

This functionality is critical for us because we separate automounter maps by
region, but look up accounts and groups in the entire directory. So different
basedn are required for each of these lookups.

Can this functonality please be restored?

Thank you.
*** BBARBE 08/01/07 03:58 am ***
@ BASEDN was introduced in the following errata
@ http://rhn.redhat.com/errata/RHBA-2006-0464.html
@ It is present in Update 4 and up
*** PLAKDAWA 08/13/07 10:47 am ***
We set the autofs basedn using /etc/sysconfig/autofs.

We do not use /etc/openldap/ldap.conf because this file is automatically
edited by the redhat config tools authconfig and
system-config-authentication. These tools setup identical basedn entries for
the two files /etc/ldap.conf and /etc/openldap/ldap.conf.

The /etc/sysconfig/autofs settings for us in RHEL AS4 are as follows:

[porus@rattlebag ~]$ cat /etc/sysconfig/autofs
# Define custom options in /etc/sysconfig/autofs
# Use LOCALOPTIONS for defining variables, e.g. OSREL
# Use DAEMONOPTIONS to define the unmount timeout
# Define UNDERSCORETODOT as 1 to convert
#=C2=A0=C2=A0=C2=A0=C2=A0 auto_home to auto.home and auto_mnt to auto.mnt
# Mount options, e.g. rsize=3D8192, should go in auto.master or
#=C2=A0=C2=A0=C2=A0=C2=A0 the auto_* map entry for a specific mount point
#
LOCALOPTIONS=3D""
DAEMONOPTIONS=3D"--timeout=3D60"
LDAPAUTOMASTER=3D""
#=C2=A0=C2=A0UNDERSCORETODOT changes auto_home to auto.home and auto_mnt = to auto.mnt
UNDERSCORETODOT=3D1
DISABLE_DIRECT=3D1
# Only source one master map if set to 1.=C2=A0=C2=A0This would mimic Sun behaviour.
# The default is 0 to maintain backwards compatibility.
ONE_AUTO_MASTER=3D0
# List of directories to be ghosted, separated by white space.
GHOSTDIRS=3D""
# Base DN to use when searching for the master map
BASEDN=3Dou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,dc=3Dcom

*** PLAKDAWA 08/14/07 02:06 pm ***
Just to give you a little more information: Our automount schema is based on
the "automountmapname", "automountkey" and "automountinformation" attributes.
This works properly with the relevant settings in the /etc/sysconfig/autofs
file on RHEL5 if the basedn is set manually in the /etc/openldap/ldap.conf
file. However, since the openldap/ldap.conf file can be used by other applications, we don't want our automounter's basedn to depend on this.

The LDAP attributes of the automount maps are as shown below:

[porus@rattlebag ~]$ ldapsearch -LLL -x -b
"ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,dc=3Dcom" "automountmapname=3Dauto= _nfshome"
dn: automountMapName=3Dauto_nfshome,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion= ,dc=3Dcom
objectClass: top
objectClass: automountMap
automountMapName: auto_nfshome
=C2=A0
[porus@rattlebag ~]$ ldapsearch -LLL -x -b
"automountmapname=3Dauto_nfshome,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,dc= =3Dcom"
"automountkey=3Dplakdawa"
dn:
automountkey=3Dplakdawa,automountMapName=3Dauto_nfshome,ou=3Dsc,ou=3Dca,o= u=3Dna,dc=3Dh
=C2=A0yperion,dc=3Dcom
automountInformation: scfs3:/vol/vol2/homes/&
automountKey: plakdawa
objectClass: top
objectClass: automount
*** PLAKDAWA 08/14/07 02:12 pm ***
I am not certain if the lab server will be reachable from your subnets. We
are part of hyperion (was recently acquired by Oracle). Please try the @ following IP address

@ Name:=C2=A0=C2=A0 labldap02.hyperion.com
Address: 172.27.33.46

The LDAP basedn for all account lookups is "dc=3Dhyperion,dc=3Dcom".

The LDAP basedn for automount lookups is
"ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,dc=3Dcom"
*** WWG 08/15/07 12:34 am ***
@ yes, as you said, BASEDN set in /etc/sysconfig/autofs doesn't work.<= /i>
@ while, you can specify the auto master entry by add one line in to
@ /etc/sysconfig/autofs
@ DEFAULT_MASTER_MAP_NAME=3D"//172.27.33.46/automountmapname=3Dauto_nfshome= ,ou=3Dsc,ou
@ =3Dca,ou=3Dna,dc=3Dhyperion,dc=3Dcom"
*** PLAKDAWA 08/20/07 11:46 am ***
We have multiple automount maps in ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,dc=3Dcom.

So should the DEFAULT_MASTER_MAP_NAME be set to the auto.master map?

[porus@rattlebag ~]$ ldapsearch -LLL -x -b
"ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,dc=3Dcom" "objectclass=3Dautomount= map"
dn: automountMapName=3Dauto_automnt,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion= ,dc=3Dcom
automountMapName: auto_automnt
objectClass: top
objectClass: automountMap

dn: automountMapName=3Dauto_master,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,= dc=3Dcom
automountMapName: auto_master
objectClass: top
objectClass: automountMap

dn: automountMapName=3Dauto.master,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,= dc=3Dcom
automountMapName: auto.master
objectClass: top
objectClass: automountMap

dn: automountMapName=3Dauto_scfs3,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,d= c=3Dcom
objectClass: top
objectClass: automountMap
automountMapName: auto_scfs3

dn: automountMapName=3Dauto_scfs4,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,d= c=3Dcom
objectClass: top
objectClass: automountMap
automountMapName: auto_scfs4

dn: automountMapName=3Dauto_nar200,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion,= dc=3Dcom
objectClass: top
objectClass: automountMap
automountMapName: auto_nar200

dn: automountMapName=3Dauto_nfshome,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperion= ,dc=3Dcom
objectClass: top
objectClass: automountMap
automountMapName: auto_nfshome

dn: automountMapName=3Dauto_products,ou=3Dsc,ou=3Dca,ou=3Dna,dc=3Dhyperio= n,dc=3Dcom
objectClass: top
objectClass: automountMap
automountMapName: auto_products
*** PLAKDAWA 08/20/07 11:51 am ***
The other issue with the DEFAULT_MASTER_MAP_NAME is that providing the full
URL, will prevent the failover to the secondary LDAP server should the one
mentioned in the URL fail. Or is it possible to add secondary entries?


over.

thanks
wengang.

Ian Kent wrote:
On Wed, 2007-09-05 at 10:15 +0800, wengang wang wrote:
  
Hi,
A custom complained that:
//<=3D=3D
In RHEL4 it was possible to set a "basedn" variable in the
/etc/sysconfig/autofs file which served as a basedn for LDAP lookups
performed by the automounter.

However, this has been removed in RHEL5.
//<=3D=3D
It is true that setting it in /etc/openldap/ldap.conf is an alternative,=20
    

No.

  
the custom doesn't want do as that because /etc/openld=
ap/ldap.conf is=20
automatically edited by the redhat config tools authconfig and=20
system-config-authentication.
So I want to know for what the basedn is removed from=20
/etc/sysconfig/autofs.  I checked all the change logs and readmes in=20
autofs-5.0.1, but didn't find basedn metioned.
    

In version 5 the base dn is calculated, depending on how you specify the
map.

Describe the problem and I'll try and give a sensible answer.

Ian


  

--=20
Wengang Wang
Member of Technical Staff
Oracle Asia R&D Center
Open Source Technologies Development

Tel:      +86 10 8278 6265
Mobile:   +86 13381078925
--------------080608040509010400010608 Content-Type: image/gif; name="mailto.gif" Content-ID: Content-Disposition: inline; filename="mailto.gif" Content-Transfer-Encoding: base64 R0lGODdhDgAKAKIAAP////r7v+rrl8TFDKOkAH1+AElKAAAAACwAAAAADgAKAAADLWi63AQw ynEMKCLrXEgFAraFgmdxm2iCpdhla8mpZRUQo0aYw+7/u8phSCwSEwA7 --------------080608040509010400010608-- --------------010307010606050407010809-- --===============1557272275571098684== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 7bit _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs --===============1557272275571098684==--