Discussion:
Unknown lookup type ldapauth?
John Dalbec
2003-03-25 20:40:56 UTC
Permalink
What am I doing wrong? I have Exim 4.12 (this happened with Exim 4.14
too, so I downgraded but it didn't help).

login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if eq {$2}{}{no}{${lookup ldapauth
{user="uid=${quote_ldap:$1},ou=People,dc=ysu,dc=edu" pass="$2"
ldap://ldap.ysu.edu/}{$value} fail}}}
server_set_id = uid=$1,ou=People,dc=ysu,dc=edu

(The server_condition is one line.)

When I try to authenticate (exim -bh) I get the prompts and then

expansion failed: unknown lookup type "ldapauth"

Any idea why?
Thanks,
John Dalbec



--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
John Dalbec
2003-03-25 20:55:08 UTC
Permalink
Post by John Dalbec
What am I doing wrong? I have Exim 4.12 (this happened with Exim 4.14
too, so I downgraded but it didn't help).
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if eq {$2}{}{no}{${lookup ldapauth
{user="uid=${quote_ldap:$1},ou=People,dc=ysu,dc=edu" pass="$2"
ldap://ldap.ysu.edu/}{$value} fail}}}
server_set_id = uid=$1,ou=People,dc=ysu,dc=edu
(The server_condition is one line.)
When I try to authenticate (exim -bh) I get the prompts and then
expansion failed: unknown lookup type "ldapauth"
Any idea why?
***@self. The "ldapauth" lookup is missing from drtables.c. From the
original 3.3 patch:

--- src/drtables.c.orig Wed Aug 15 06:09:08 2001
+++ src/drtables.c Wed Oct 3 08:05:01 2001
@@ -174,6 +174,23 @@
#endif
},

+/* LDAP lookup, just checking for authentication */
+
+ {
+ "ldapauth", /* lookup name */
+ lookup_querystyle, /* query-style lookup */
+#ifdef LOOKUP_LDAP
+ eldap_open, /* sic */ /* open function */
+ NULL, /* check function */
+ eldapauth_find, /* find function */
+ NULL, /* no close function */
+ eldap_tidy, /* sic */ /* tidy function */
+ eldap_quote /* sic */ /* quoting function */
+#else
+ NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
+#endif
+ },
+
/* LDAP lookup, allowing data from more than one entry to be returned */

{

HTH,
John Dalbec
Post by John Dalbec
Thanks,
John Dalbec
--
## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##
--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
Nico Erfurth
2003-03-25 20:57:39 UTC
Permalink
Post by John Dalbec
What am I doing wrong? I have Exim 4.12 (this happened with Exim 4.14
too, so I downgraded but it didn't help).
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if eq {$2}{}{no}{${lookup ldapauth
{user="uid=${quote_ldap:$1},ou=People,dc=ysu,dc=edu" pass="$2"
ldap://ldap.ysu.edu/}{$value} fail}}}
server_set_id = uid=$1,ou=People,dc=ysu,dc=edu
(The server_condition is one line.)
When I try to authenticate (exim -bh) I get the prompts and then
expansion failed: unknown lookup type "ldapauth"
ldapauth isn't a lookup, it's a condition.

${if ldapauth {\
user="uid=${quote_ldap:$1},ou=People,dc=ysu,dc=edu" pass="$2" \
ldap://ldap.ysu.edu/
}{1}{0}}

IIRC all what exim does here is to bind to the given uid/dn.

Nico


--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
Loading...