<div dir="ltr"><div><div><div>Hi.<br><br></div>I'm having trouble setting up a rlm_ldap module.<br><br></div>FR version is 3.0.0<br><br></div>Trimmed output from radiusd -X:<br><br><font size="1"><span style="font-family:courier new,monospace">radiusd: #### Instantiating modules ####<br>

 instantiate {<br> }<br> modules {<br>  # Loaded module rlm_ldap<br>  # Instantiating module "ldap_xxxxxx" from file /usr/local/etc/raddb/mods-enabled/ldap_xxxxxx<br>  ldap ldap_xxxxxx {<br>  Â Â Â  server = "<a href="http://ldap.example.org">ldap.example.org</a>"<br>

  Â Â Â  port = 636<br>  Â Â Â  password = "whocares"<br>  Â Â Â  identity = "<a href="mailto:someuser@example.org">someuser@example.org</a>"<br>   user {<br>   Â Â Â  filter = "(sAMAccountName=%{%{Stripped-User-Name}:-%{User-Name}})"<br>

   Â Â Â  scope = "sub"<br>   Â Â Â  base_dn = "dc=example,dc=org"<br>   Â Â Â  access_positive = yes<br>   }<br>   group {<br>   Â Â Â  filter = "(objectClass=posixGroup)"<br>   Â Â Â  scope = "sub"<br>

   Â Â Â  base_dn = "dc=example,dc=org"<br>   Â Â Â  name_attribute = "cn"<br>   Â Â Â  membership_attribute = "memberOf"<br>   Â Â Â  cacheable_name = no<br>   Â Â Â  cacheable_dn = no<br>   }<br>   client {<br>

   Â Â Â  scope = "sub"<br>    attribute {<br>    Â Â Â  identifier = "host"<br>    Â Â Â  shortname = "cn"<br>    }<br>   }<br>   profile {<br>   Â Â Â  filter = "(&)"<br>   }<br>   options {<br>

   Â Â Â  ldap_debug = 40<br>   Â Â Â  chase_referrals = no<br>   Â Â Â  rebind = yes<br>   Â Â Â  net_timeout = 3<br>   Â Â Â  res_timeout = 20<br>   Â Â Â  srv_timelimit = 20<br>   Â Â Â  idle = 60<br>   Â Â Â  probes = 3<br>   Â Â Â  interval = 3<br>

   }<br>   tls {<br>   Â Â Â  ca_file = "/usr/local/etc/raddb/certs/ca.example.org.pem"<br>   Â Â Â  start_tls = no<br>   Â Â Â  require_cert = "demand"<br>   }<br>  }<br>   accounting {<br>   Â Â Â  reference = "."<br>

   }<br>   post-auth {<br>   Â Â Â  reference = "."<br>   }<br>rlm_ldap (ldap_xxxxxx): Initialising connection pool<br>   pool {<br>   Â Â Â  start = 4<br>   Â Â Â  min = 2<br>   Â Â Â  max = 6<br>   Â Â Â  spare = 2<br>   Â Â Â  uses = 0<br>

   Â Â Â  lifetime = 0<br>   Â Â Â  cleanup_delay = 5<br>   Â Â Â  idle_timeout = 60<br>   Â Â Â  spread = no<br>   }<br>rlm_ldap (ldap_xxxxxx): Opening additional connection (0)<br>rlm_ldap (ldap_xxxxxx): Connecting to <a href="http://ldap.example.org:636">ldap.example.org:636</a><br>

rlm_ldap (ldap_xxxxxx): Bind with <a href="mailto:someuser@example.org">someuser@example.org</a> to <a href="http://ldap.example.org:636">ldap.example.org:636</a> failed: Can't contact LDAP server<br>rlm_ldap (ldap_xxxxxx): Opening connection failed (0)<br>

rlm_ldap (ldap_xxxxxx): Removing connection pool<br>/usr/local/etc/raddb/mods-enabled/ldap_xxxxxx[8]: Instantiation failed for module "ldap_xxxxxx"</span></font><br clear="all"><div><div><div><div><div><br></div>

<div><br>FR is able to bind with the LDAP server only if <span style="font-family:courier new,monospace">require_cert</span> is set to <span style="font-family:courier new,monospace">"never"</span>, which makes me believe this is a certificate verification issue.<br>

<br></div><div>I tried to do a manual connect using openssl using<br></div><div><font size="1"><span style="font-family:courier new,monospace">openssl s_client -connect <a href="http://ldap.example.org:636">ldap.example.org:636</a> -CAfile </span></font><font size="1"><span style="font-family:courier new,monospace"><font size="1"><span style="font-family:courier new,monospace">/usr/local/etc/raddb/certs/ca.example.org.pem</span></font> -debug</span></font><br>

</div><div></div><div>which shows a <span style="font-family:courier new,monospace">Verify return code: 0 (ok)</span><br></div><div><br></div><div>Module is being called at the sites-enabled/default:<br></div><div><span style="font-family:courier new,monospace">authorize {<br>

....<br></span></div><div><span style="font-family:courier new,monospace">    -ldap_xxxxx<br>....<br>}</span><br></div><div><br></div><div>BTW: Why the "-" before the module name?<br></div><div><br></div><div>TIA<br>

</div><br></div></div></div></div></div>