[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: autofs and OpenLDAP integration



On Tue, Jul 31, 2001 at 04:52:01PM +0200, Christian Michels wrote:
> Nalin wrote:
> > This should duplicate the first search pretty closely:
> > ldapsearch -x '(&(objectclass=automountMap)(ou=auto.master))' dn
> 
> Here is my version (I added -LLL to get only the entries):
> 
> michels@grommit:~ > ldapsearch -x
> '(&(objectclass=automountMap)(ou=auto.master))' dn -LLL
> dn: ou=auto.master,dc=mathematik,dc=uni-trier,dc=de
> 
> michels@grommit:~ >
> 
> Is the blank line between dn: ... and michels@... correct? Or should I see
> something else there?

It's expected.  The ldapsearch tool ends every entry it outputs with a
blank line, even if you've only received one entry as a response to your
search.  I don't know if this is part of the LDIF spec or not.

[snip]
> dn: cn=/misc,nisMapName=auto.master,dc=mathematik,dc=uni-trier,dc=de
> objectClass: nisObject
> cn: /misc
> nisMapEntry: /etc/auto.misc
> nisMapName: auto.master
[snip] 
> So this gives me:
[snip]
> michels@grommit:~ > ldapsearch -x -b
> 'nisMapName=auto.master,dc=mathematik,dc=uni-trier,dc=de' cn nisMapEntry -LLL
> dn: nisMapName=auto.master,dc=mathematik,dc=uni-trier,dc=de
> 
> dn: cn=/misc,nisMapName=auto.master,dc=mathematik,dc=uni-trier,dc=de
> nisMapEntry: /etc/auto.misc

Sounds like your scenario is right.  It looks like your server isn't
returning values for the CN attribute, even though you're asking for it
specifically.  That's weird, and I don't know if that's supposed to be
allowed to happen.  I'll have to read some specs to find out.

Here's the output I get when querying our local server:

  nalin@blade:~> ldapsearch -x '(&(objectclass=automountMap)(ou=auto.master))' dn -LLL
  dn: ou=auto.master,dc=devel,dc=redhat,dc=com

  nalin@blade:~> ldapsearch -x -b ou=auto.master,dc=devel,dc=redhat,dc=com '(objectclass=automount)' cn automountInformation -LLL
  dn: cn=/mnt, ou=auto.master,dc=devel,dc=redhat,dc=com
  cn: /mnt
  automountInformation: ldap:devserv.devel.redhat.com:ou=auto.mnt,dc=devel,dc=redhat,dc=com

  dn: cn=/home, ou=auto.master,dc=devel,dc=redhat,dc=com
  cn: /home
  automountInformation: ldap:devserv.devel.redhat.com:ou=auto.home,dc=devel,dc=redhat,dc=com

  dn: cn=/misc, ou=auto.master,dc=devel,dc=redhat,dc=com
  cn: /misc
  automountInformation: ldap:devserv.devel.redhat.com:ou=auto.misc,dc=devel,dc=redhat,dc=com --timeout=60

  nalin@blade:~>

Cheers,

Nalin