Hello,<br><br>I'm working with Freeradius 2.1.8<br><br>I'm using session (sql) to control simultaneous use.<br><br>I would like to return a special value if an user try to access with credentials in use.<br><br>Group session {...} always resturns ok, so I don't know what can I do in post-auth to <span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">distinguish between all reject.<br>
<br>I test this configuration in my default server:<br><br>session {<br> if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") {<br> sql<br> }<br>}<br><br><br>post-auth {<br>
if (fail) {<br> update reply {<br> Codigo-Reject := Imposible-Contactar-Backend<br> }<br> reject<br> }<br></span></span><span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q"> sql</span></span><br>
<span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q"> Post-Auth-Type REJECT {<br> if (simulcount) {<br> update reply {<br> Codigo-Reject = Sesion-Abierta<br>
}<br> }<br> update reply {<br> Codigo-Reject = Credenciales-Erroneas<br> }<br> sql<br> attr_filter.access_reject<br>
}<br>}<br><br>But don't work.<br><br>Here is part of the debug info for an accept request:<br><br>[pap] User authenticated successfully<br>++[pap] returns ok<br>+- entering group session {...}<br>++? if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>")<br>
expand: %{Realm} -> <a href="http://xxx.es">xxx.es</a><br>?? Evaluating ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") -> TRUE<br>++? if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") -> TRUE<br>
++- entering if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") {...}<br>. . .<br><br>rlm_sql (sql): Reserving sql socket id: 4<br>rlm_sql (sql): Released sql socket id: 4<br>+++[sql] returns ok<br>
++- if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") returns ok<br>+- entering group post-auth {...}<br><br><br>And </span></span><span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">here is part of the debug info for an reject request for simultaneous use:</span></span><br>
<span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q"><br>[pap] User authenticated successfully<br>++[pap] returns ok<br></span></span><span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">+- entering group session {...}</span></span><br>
<span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">++? if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>")<br> expand: %{Realm} ->
<a href="http://xxx.es">xxx.es</a><br>?? Evaluating ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") -> TRUE<br>++? if
("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") -> TRUE<br>++- entering if ("%{Realm}" ==
"<a href="http://xxx.es">xxx.es</a>") {...}<br>. . .<br></span></span><br><span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">rlm_sql (sql): Reserving sql socket id: 3<br>rlm_sql (sql): Released sql socket id: 3<br>
+++[sql] returns ok<br></span></span><span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">++- if ("%{Realm}" == "<a href="http://xxx.es">xxx.es</a>") returns ok</span></span><br>
<span class="clickable" onclick="redirectWR(event,"OXesen")"><span class="q">} # server rinuex<br>Using Post-Auth-Type Reject<br>+- entering group REJECT {...}<br>++? if (simulcount)<br>? Evaluating (simulcount) -> TRUE<br>
++? if (simulcount) -> TRUE<br></span></span><br><br>I need help. Thank you very much and sorry for my english.<br><br><br>-- <br>____________________<br><br> Ana Gallardo Gómez<br>____________________<br>