<div>We have 802.1x authentication via AD. It's okay. Now, we would like to reject users based on LDAP attribute, WLANStatus. Added attribute in dictionary and ldap.attrmap as follow. Where should I put the unlang?</div>
<div><br></div><div>/etc/raddb/dictionary</div><div>ATTRIBUTE My-Local-wlanStatus 3000 string</div><div><br></div><div>/etc/raddb/ldap.attrmap</div><div>replyItem My-Local-wlanStatus WLANStatus</div>
<div><br></div><div>/etc/raddb/sites-available/default</div><div>authorize {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>...</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ldap</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>if (My-Local-wlanStatus == "A1") {</div><div> reject</div><div> }</div><div> ...</div><div>}</div><div><br></div><div>
rlm_ldap: waiting for bind result ...</div><div>rlm_ldap: Bind was successful</div><div>rlm_ldap: performing search in ou=student,o=<a href="http://example.com">example.com</a>, with filter (uid=testuser)</div><div>[ldap] looking for check items in directory...</div>
<div>[ldap] looking for reply items in directory...</div><div>rlm_ldap: WLANStatus -> My-Local-wlanStatus = "A1"</div><div>WARNING: No "known good" password was found in LDAP. Are you sure that the user is configured correctly?</div>
<div>[ldap] user testuser authorized to use remote access</div><div>rlm_ldap: ldap_release_conn: Release Id: 0</div><div>++[ldap] returns ok</div><div>++? if (My-Local-wlanStatus == "A1")</div><div> (Attribute My-Local-wlanStatus was not found)</div>