<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font color="red" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: red;"><font
color="#000000">Should be:<br>
</font><br>
if</span></font><font color="blue" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: blue;">(request:User-Password
== "%{request:User-Name}"</span></font><font color="red" face="Arial"
size="2"><span style="font-size: 10pt; font-family: Arial; color: red;">)
{</span></font>
<blockquote
cite="mid:BAE950BC18178544ADB2B86C0706745F020CD25C@exchange.gtcorp.com"
type="cite"><o:smarttagtype
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName">
<div class="Section1">
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">However when I try to run
Radius I keep getting this error:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="red" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: red;">Expected
regular expression at:
request:User-Password)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="red" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: red;">/etc/raddb/sites-enabled/default[308]:
Failed
to parse "if" subsection.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="red" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: red;">Errors
initializing modules<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="red" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: red;"><o:p> </o:p></span></font></p>
<div>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">I also tried I lot other syntax and different
operators as well but the
error is still there… What is the right syntax?? Thank you!<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Guest-tek, <st1:personname w:st="on">Difan
Zhao</st1:personname><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="mailto:difan.zhao@guest-tek.com">difan.zhao@guest-tek.com</a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="http://www.guest-tek.com">www.guest-tek.com</a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Office: 403-509-1010 ext 3048<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Cell: 403-689-7514<o:p></o:p></span></font></p>
<div class="MsoNormal" style="text-align: center;" align="center"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font
face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma;">
<a class="moz-txt-link-abbreviated" href="mailto:freeradius-users-bounces+difan.zhao=guest-tek.com@lists.freeradius.org">freeradius-users-bounces+difan.zhao=guest-tek.com@lists.freeradius.org</a>
[<a class="moz-txt-link-freetext" href="mailto:freeradius-users-bounces+difan.zhao=guest-tek.com@lists.freeradius.org">mailto:freeradius-users-bounces+difan.zhao=guest-tek.com@lists.freeradius.org</a>]
<b><span style="font-weight: bold;">On Behalf Of </span></b><st1:personname
w:st="on">Difan Zhao</st1:personname><br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday,
December 29, 2009
11:09 AM<br>
<b><span style="font-weight: bold;">To:</span></b> <st1:personname
w:st="on">FreeRadius users mailing list</st1:personname><br>
<b><span style="font-weight: bold;">Subject:</span></b> RE: MAC
authentication
bypass --- How amIsupposedto?edit?theusersfile to include multiple MAC
addresses??</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Greetings,<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">I hope you all had a wonderful Christmas
holidays!<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">So I continued my work this morning. It looks
like it can authenticate
the devices (<font color="red"><span style="color: red;">with the
certain MAC
address pattern</span></font>) however from the Radius –X output (which
I
attached here) it doesn’t seem to authenticate it the way I want it.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Let me repeat my logic here: if the MAC
addresses match the pattern,
use the <b><font color="blue"><span
style="color: blue; font-weight: bold;">User-Name</span></font></b>
(or <b><font color="blue"><span style="color: blue; font-weight: bold;">Calling-station-ID</span></font></b>,
since
I <b><font color="blue"><span style="color: blue; font-weight: bold;">“rewrite”</span></font></b>
it to be the same as the User-name) and the password (<font color="red"><span
style="color: red;">which is made to be the same as the User-name as
well)</span></font>
to authenticate the device.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">However it looks like my <b><font
color="blue"><span style="color: blue; font-weight: bold;">“if”</span></font></b>
conditions are all matched
during the process however they all returned <b><font color="blue"><span
style="color: blue; font-weight: bold;">“noop”</span></font></b>
instead of <b><font color="blue"><span
style="color: blue; font-weight: bold;">updating</span></font></b>
the information I wanted it to.<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Here are the <b><font color="blue"><span
style="color: blue; font-weight: bold;">configurations</span></font></b>
I made in the <b><font color="blue"><span
style="color: blue; font-weight: bold;">policy.conf</span></font></b>
and <b><font color="blue"><span style="color: blue; font-weight: bold;">/sites-avaliable/default</span></font></b>
files<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><b><font color="blue" face="Courier New"
size="2"><span style="font-size: 10pt; color: blue; font-weight: bold;">Policy.conf:<o:p></o:p></span></font></b></p>
<p class="MsoPlainText"><b><font color="blue" face="Courier New"
size="2"><span style="font-size: 10pt; color: blue; font-weight: bold;"><o:p> </o:p></span></font></b></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">policy {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
…<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
rewrite_calling_station_id {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
if(request:Calling-Station-Id =~
/00-A0-08-([0-9A-F]{2})-([[0-9A-F]{2})-([[0-9A-F]{2})/i) {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
update request {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
Calling-Station-Id := "00a008%{1}%{2}%{3}"<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
else {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
noop<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;"> }<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">}</span></font>
<o:p></o:p></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><b><font color="blue" face="Courier New"
size="2"><span style="font-size: 10pt; color: blue; font-weight: bold;">Default:<o:p></o:p></span></font></b></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">authorize {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
…<o:p></o:p></span></font></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: 0.5in;"><font color="red"
face="Courier New" size="2"><span style="font-size: 10pt; color: red;">rewrite_calling_station_id<o:p></o:p></span></font></p>
<p class="MsoPlainText"
style="margin-left: 0.5in; text-indent: 0.5in;"><font color="red"
face="Courier New" size="2"><span style="font-size: 10pt; color: red;">if((Service-Type
==
'Call-Check') && (User-Name =~ /^%{Calling-Station-ID}$/i)){<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
update control {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
Auth-Type = 'Auth-NHSTB'<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText" style="text-indent: 0.5in;"><font color="red"
face="Courier New" size="2"><span style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">authenticate {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
…<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
Auth-Type Auth-NHSTB {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
if(Chap-Password){<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
update control {<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
Cleartext-Password := "%{User-Name}"<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
chap<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
else{<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
</span></font><b><font color="blue"><span
style="color: blue; font-weight: bold;">ok<o:p></o:p></span></font></b></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">
}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font color="red" face="Courier New" size="2"><span
style="font-size: 10pt; color: red;">}<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">It seems to me that the last <b><font
color="blue"><span style="color: blue; font-weight: bold;">“ok”</span></font></b>
authenticated the device, instead of using <b><font color="blue"><span
style="color: blue; font-weight: bold;">“chap”</span></font></b> and
the <b><font color="blue"><span style="color: blue; font-weight: bold;">“Cleartext-Password”</span></font></b>
that I assigned. Any ideas? Thank you!<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Guest-tek, <st1:personname w:st="on">Difan
Zhao</st1:personname><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="mailto:difan.zhao@guest-tek.com">difan.zhao@guest-tek.com</a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="http://www.guest-tek.com">www.guest-tek.com</a><o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Office: 403-509-1010 ext 3048<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;">Cell: 403-689-7514<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a></pre>
</o:smarttagtype></blockquote>
<br>
</body>
</html>