<div dir="ltr">Thanks Alan! The following code in the sites-available/inner-tunnel solved the problem.<br><br> if ("%{sql: SELECT COUNT(*) FROM radcheck WHERE username = '%{SQL-User-Name}' AND pwdtype = 'local'}" > 0) {<br>
update control {<br> MS-CHAP-Use-NTLM-Auth := 0<br> }<br> }<br><br><div><div class="gmail_extra"><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">ffgch2 wrote:<br>
> I have set up Freeradius (v.2.1.10)<br>
<br>
</div> Upgrade to v2.2.0.<br>
<div class="im"><br>
> to do password authentication from<br>
> MySQL database and it works fine but now I need to make some users be<br>
> able to authenticate against Active directory accounts. I’ve setup<br>
> winbind to authenticate windows accounts and it works but as a result<br>
> freeradius lost ability to authenticate by local database.<br>
<br>
</div> You need to figure out when users will be checked against SQL, and<br>
when they will be checked against AD. Right now, you've configured<br>
FreeRADIUS to use both. Which isn't what you want.<br>
<div class="im"><br>
> So if I comment the line:<br>
<br>
</div> Don't randomly change things. It won't work.<br>
<div class="im"><br>
> Is there a way to tell mschap to use ntlm_auth depending on field in<br>
> MySQL table and use the internal mechanisms if plain text passwords<br>
> available in the MySQL table?<br>
<br>
</div> No. There are better ways.<br>
<br>
See raddb/modules/mschap. You can control when ntlm_auth is called.<br>
<br>
See "man unlang". You can configure policies. Read the debug output.<br>
<br>
What you want is this:<br>
<br>
authorize {<br>
...<br>
sql<br>
if (ok) {<br>
update control {<br>
"MS-CHAP-Use-NTLM-Auth := No<br>
}<br>
<br>
}<br>
...<br>
}<br>
<span class=""><font color="#888888"><br>
Alan DeKok.<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</font></span></blockquote></div><br></div></div></div>