On Sat, 05 Mar 2011 11:16:39 +0200 Leonidas Tsampros wrote: LT> Ted Zlatanov writes: >> On Fri, 04 Mar 2011 22:47:20 +0200 Leonidas Tsampros wrote: >> LT> Attached you can find a small patch to make ldap.el use auth-source if LT> passwd is not defined in the ldap-host-parameters-list. >> >> Cool! I made some changes to it, please let me know what you think: >> >> - must pass `auth-source' set to t in the SEARCH-PLIST to activate this >> functionality (I don't know if you agree) LT> Agreed. It's nice not to catch users by surprise. >> - search for 'port "ldap"' entries in the netrc file (should we default >> to no port?) LT> This is the only part I disagree a bit. For example, my imap host is the LT> same with my ldap host, the credentials are the same for both services, LT> and both imap/ldap use the default ports. (This is a classic case of an LT> Exchange server I think) This makes sense, especially since ldap.el hosts can be in the format "server:port". I removed the "port ldap" requirement. >> - take the password and use it >> >> - take "binddn" or "user" tokens for `binddn' >> >> - take "base" tokens for `base' LT> (Really there is no wrong direction in this. We just don't want to carry LT> passwords in our configuration files. :) Agreed, and that's why I've been working on auth-source.el. Try the attached patch. If it works for you I'll push it into the trunk. Let me know if I need to update any other documentation besides the docstring. It looks like only Chong Yidong has made significant changes to ldap.el since 2005 so I'm not CC-ing the original author. Thanks Ted