aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Fitzsimmons2015-04-10 21:55:40 -0400
committerThomas Fitzsimmons2015-04-10 21:56:37 -0400
commitc0984249eb65641a0876594183c80fd8e6b37962 (patch)
tree483f14b3c6130b1ef05cf172b199fa7a336c60ab
parentf55ea05bdf60e24c09f9064fc0d2e8a114d6e358 (diff)
downloademacs-c0984249eb65641a0876594183c80fd8e6b37962.tar.gz
emacs-c0984249eb65641a0876594183c80fd8e6b37962.zip
Clean up LDAP Configuration section of EUDC manual
* doc/misc/eudc.texi: Combine indices. (LDAP Configuration): Use command markup. Add index entries. Change formatting. Wrap long lines. Add noindent markup.
-rw-r--r--doc/misc/eudc.texi70
1 files changed, 42 insertions, 28 deletions
diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi
index 9757c82fe7e..76a25c1a33e 100644
--- a/doc/misc/eudc.texi
+++ b/doc/misc/eudc.texi
@@ -4,6 +4,8 @@
4@settitle Emacs Unified Directory Client (EUDC) Manual 4@settitle Emacs Unified Directory Client (EUDC) Manual
5@afourpaper 5@afourpaper
6@documentencoding UTF-8 6@documentencoding UTF-8
7@syncodeindex fn cp
8@syncodeindex vr cp
7@c %**end of header 9@c %**end of header
8 10
9@copying 11@copying
@@ -61,8 +63,7 @@ modify this GNU manual.''
61* Usage:: The various usage possibilities explained 63* Usage:: The various usage possibilities explained
62* Credits:: Who's done what 64* Credits:: Who's done what
63* GNU Free Documentation License:: The license for this documentation. 65* GNU Free Documentation License:: The license for this documentation.
64* Command and Function Index:: 66* Index::
65* Variables Index::
66@end menu 67@end menu
67 68
68 69
@@ -220,15 +221,15 @@ email composition buffers (@pxref{Inline Query Expansion})
220@section LDAP Configuration 221@section LDAP Configuration
221 222
222LDAP support is added by means of @file{ldap.el}, which is part of 223LDAP support is added by means of @file{ldap.el}, which is part of
223Emacs. @file{ldap.el} needs an external command line utility named 224Emacs. @file{ldap.el} needs an external program called
224@file{ldapsearch}, available as part of OpenLDAP 225@command{ldapsearch}, available as part of OpenLDAP
225(@url{http://www.openldap.org/}). The configurations in this section 226(@url{http://www.openldap.org/}). The configurations in this section
226were tested with OpenLDAP 2.4.23. 227were tested with OpenLDAP 2.4.23.
227 228
228The following examples use a base of 229The following examples use a base of
229@code{ou=people,dc=example,dc=com} and the host name 230@code{ou=people,dc=example,dc=com} and the host name
230@code{directory.example.com}, a server that supports LDAP-over-SSL 231@code{ldaps.gnu.org}, a server that supports LDAP-over-SSL (the
231(the @code{ldaps} protocol, with default port @code{636}) and which 232@code{ldaps} protocol, with default port @code{636}) and which
232requires authentication by the user @code{emacsuser} with password 233requires authentication by the user @code{emacsuser} with password
233@code{s3cr3t}. 234@code{s3cr3t}.
234 235
@@ -244,14 +245,21 @@ example, attempting to TAB-complete the following:
244To: * Smith 245To: * Smith
245@end example 246@end example
246 247
248@noindent
247will return all LDAP entries with surnames that begin with 249will return all LDAP entries with surnames that begin with
248@code{Smith}. In every LDAP query it makes, EUDC implicitly appends 250@code{Smith}. In every LDAP query it makes, EUDC implicitly appends
249the wildcard character to the end of the last word. 251the wildcard character to the end of the last word.
250 252
253@menu
254* Emacs-only Configuration:: Configure with @file{.emacs}
255* External Configuration:: Configure with @file{/etc/openldap/ldap.conf}
256@end menu
257
258@node Emacs-only Configuration
251@subsection Emacs-only Configuration 259@subsection Emacs-only Configuration
252 260
253Emacs can pass most required configuration options via the 261Emacs can pass most required configuration options via the
254@file{ldapsearch} command-line. One exception is certificate 262@command{ldapsearch} command-line. One exception is certificate
255configuration for LDAP-over-SSL, which must be specified in 263configuration for LDAP-over-SSL, which must be specified in
256@file{/etc/openldap/ldap.conf}. On systems that provide such 264@file{/etc/openldap/ldap.conf}. On systems that provide such
257certificates as part of the @code{OpenLDAP} installation, this can be 265certificates as part of the @code{OpenLDAP} installation, this can be
@@ -269,14 +277,19 @@ LDAP:
269 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline)) 277 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))
270(customize-set-variable 'eudc-server-hotlist 278(customize-set-variable 'eudc-server-hotlist
271 '(("" . bbdb) 279 '(("" . bbdb)
272 ("ldaps://directory.example.com" . ldap))) 280 ("ldaps://ldaps.gnu.org" . ldap)))
273(customize-set-variable 'ldap-host-parameters-alist 281(customize-set-variable 'ldap-host-parameters-alist
274 '(("ldaps://directory.example.com" 282 '(("ldaps://ldaps.gnu.org"
275 base "ou=people,dc=example,dc=com" 283 base "ou=people,dc=example,dc=com"
276 binddn "example\\emacsuser" 284 binddn "example\\emacsuser"
277 passwd ldap-password-read))) 285 passwd ldap-password-read)))
278@end lisp 286@end lisp
279 287
288@findex ldap-password-read
289@vindex passwd
290@vindex password-cache
291@vindex password-cache-expiry
292@findex password-reset
280Specifying the function @code{ldap-password-read} for @code{passwd} 293Specifying the function @code{ldap-password-read} for @code{passwd}
281will cause Emacs to prompt interactively for the password. The 294will cause Emacs to prompt interactively for the password. The
282password will then be validated and cached, unless 295password will then be validated and cached, unless
@@ -285,6 +298,7 @@ password will then be validated and cached, unless
285password is cached. If you want to clear the cache, call 298password is cached. If you want to clear the cache, call
286@code{password-reset}. 299@code{password-reset}.
287 300
301@node External Configuration
288@subsection External Configuration 302@subsection External Configuration
289 303
290Your system may already be configured for a default LDAP server. For 304Your system may already be configured for a default LDAP server. For
@@ -292,17 +306,19 @@ example, @file{/etc/openldap/ldap.conf} might contain:
292 306
293@example 307@example
294BASE ou=people,dc=example,dc=com 308BASE ou=people,dc=example,dc=com
295URI ldaps://directory.example.com 309URI ldaps://ldaps.gnu.org
296TLS_CACERTDIR /etc/openldap/certs 310TLS_CACERTDIR /etc/openldap/certs
297@end example 311@end example
298 312
299To authenticate, the @dfn{bind distinguished name (binddn)} is 313@cindex bind distinguished name
300required, in this case, @code{example\emacsuser}, along with the 314@cindex binddn
301password. These can be specified in @file{~/.authinfo.gpg} with the 315Authentication requires a password, and a @dfn{bind distinguished name
302following line: 316(binddn)} representing the user, in this case,
317@code{example\emacsuser}. These can be specified in
318@file{~/.authinfo.gpg} with the following line:
303 319
304@example 320@example
305machine ldaps://directory.example.com binddn example\emacsuser password s3cr3t 321machine ldaps://ldaps.gnu.org binddn example\emacsuser password s3cr3t
306@end example 322@end example
307 323
308Then in the @file{.emacs} init file, these expressions suffice to 324Then in the @file{.emacs} init file, these expressions suffice to
@@ -313,15 +329,15 @@ configure EUDC for LDAP:
313 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline)) 329 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))
314(customize-set-variable 'eudc-server-hotlist 330(customize-set-variable 'eudc-server-hotlist
315 '(("" . bbdb) 331 '(("" . bbdb)
316 ("ldaps://directory.example.com" . ldap))) 332 ("ldaps://ldaps.gnu.org" . ldap)))
317(customize-set-variable 'ldap-host-parameters-alist 333(customize-set-variable 'ldap-host-parameters-alist
318 '(("ldaps://directory.example.com" 334 '(("ldaps://ldaps.gnu.org"
319 auth-source t))) 335 auth-source t)))
320@end lisp 336@end lisp
321 337
322For this example where we only care about one server, the server name 338For this example where we only care about one server, the server name
323can be omitted in @file{~/.authinfo.gpg} and @file{.emacs}, in which 339can be omitted in @file{~/.authinfo.gpg} and @file{.emacs}, in which
324case @file{ldapsearch} defaults to the host name in 340case @command{ldapsearch} defaults to the host name in
325@file{/etc/openldap/ldap.conf}. 341@file{/etc/openldap/ldap.conf}.
326 342
327The @file{~/.authinfo.gpg} line becomes: 343The @file{~/.authinfo.gpg} line becomes:
@@ -330,13 +346,16 @@ The @file{~/.authinfo.gpg} line becomes:
330binddn example\emacsuser password s3cr3t 346binddn example\emacsuser password s3cr3t
331@end example 347@end example
332 348
349@noindent
333and the @file{.emacs} expressions become: 350and the @file{.emacs} expressions become:
334 351
335@lisp 352@lisp
336(eval-after-load "message" 353(eval-after-load "message"
337 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline)) 354 '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))
338(customize-set-variable 'eudc-server-hotlist '(("" . bbdb) ("" . ldap))) 355(customize-set-variable 'eudc-server-hotlist
339(customize-set-variable 'ldap-host-parameters-alist '(("" auth-source t))) 356 '(("" . bbdb) ("" . ldap)))
357(customize-set-variable 'ldap-host-parameters-alist
358 '(("" auth-source t)))
340@end lisp 359@end lisp
341 360
342@node Usage 361@node Usage
@@ -1043,14 +1062,9 @@ in testing and proofreading the code and docs of @file{ph.el}.
1043@appendix GNU Free Documentation License 1062@appendix GNU Free Documentation License
1044@include doclicense.texi 1063@include doclicense.texi
1045 1064
1046@node Command and Function Index 1065@node Index
1047@unnumbered Command and Function Index 1066@unnumbered Index
1048
1049@printindex fn
1050
1051@node Variables Index
1052@unnumbered Variables Index
1053 1067
1054@printindex vr 1068@printindex cp
1055 1069
1056@bye 1070@bye