(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) Trash : (Answer) EUDC, the Emacs Unified Directory Client
The Emacs Unified Directory Client (EUDC) allows querying an LDAP server from 
within emacs. EUDC uses the elisp module "ldap.el" which unfortunatly, at the 
time of this writing, does not work as expected.

ldap.el uses the command-line utility "ldapsearch" to query the LDAP server. If 
you are running into errors such as "cannot open file, file not found" then 
perhaps this patch will help:

--BEGIN--CUT-HERE--

*** /usr/share/emacs/21.2/lisp/net/ldap.el      Fri Mar 22 11:02:51 2002
--- /usr/share/emacs21/site-lisp/ldap.el        Thu Aug 29 02:39:50 2002
***************
*** 157,163 ****
    :type '(string :tag "`ldapsearch' Program")
    :group 'ldap)
  
! (defcustom ldap-ldapsearch-args '("-B")
    "*A list of additional arguments to pass to `ldapsearch'.
  It is recommended to use the `-T' switch with Netscape's
  implementation to avoid line wrapping.
--- 157,164 ----
    :type '(string :tag "`ldapsearch' Program")
    :group 'ldap)
  
! ;; (defcustom ldap-ldapsearch-args '("-B")
! (defcustom ldap-ldapsearch-args '("-LLL")
    "*A list of additional arguments to pass to `ldapsearch'.
  It is recommended to use the `-T' switch with Netscape's
  implementation to avoid line wrapping.
***************
*** 568,574 ****
                           buf
                           nil    
                           ,@arglist
!                          "-t"         ; Write values to temp files
                           ,@ldap-ldapsearch-args
                           ,@filter))
        (insert "\n")
--- 569,575 ----
                           buf
                           nil    
                           ,@arglist
!                          "-tt"                ; Write values to temp files
                           ,@ldap-ldapsearch-args
                           ,@filter))
        (insert "\n")
***************
*** 584,592 ****
--- 585,605 ----
                                               (end-of-line)
                                               (point))))
          (forward-line 1)
+         (while (looking-at "^ \\(.*\\)$")
+           (append dn (match-string 1))
+           (forward-line 1))
+ 
          (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
            (setq name (match-string 1)
                  value (match-string 3))
+ 
+           (forward-line 1)
+ 
+           (while (looking-at "^ \\(.*\\)$")
+             jdsfslj
+             (append value (match-string 1))
+             (forward-line 1))
+           
            (save-excursion
              (set-buffer bufval)
              (erase-buffer)
***************
*** 595,601 ****
              (setq value (buffer-substring (point-min) (point-max))))
            (setq record (cons (list name value)
                               record))
!           (forward-line 1))
          (setq result (cons (if withdn 
                                 (cons dn (nreverse record))
                               (nreverse record)) result))
--- 608,614 ----
              (setq value (buffer-substring (point-min) (point-max))))
            (setq record (cons (list name value)
                               record))
!           )
          (setq result (cons (if withdn 
                                 (cons dn (nreverse record))
                               (nreverse record)) result))
--END--CUT-HERE--

Basically, the algorithm to concatenate the next line if it begins with a space 
character was not implemented, the -B value is unknown to OpenLDAP's 
"ldapsearch"utility, the -LLL option needs to be specified so that no
extraneous information is returned, and the -tt option needs to be specified
so that all returned values of attributes are placed within a file.
soggytrousers@yahoo.com
[Append to This Answer]
This document is: http://www.openldap.org/faq/index.cgi?file=739
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org