<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Stefan that worked! <br>
<br>
Now I have one more problem. We give our user a time limit on how much
time they can be online for and that seems to be a sticking point. I
didn't get an error when I was testing because I had unlimited time and
did not have that field in the database, but when I turned it loose for
our customers nobody could connect. Do I need to add something to the
select statement in the sql.conf file?<br>
<br>
Thanks again<br>
<br>
Mike<br>
<br>
The error from radiusd -X is:<br>
<br>
radius_xlat: 'jwardlaw'<br>
rlm_sql (sql): sql_set_user escaped user --> 'jwardlaw'<br>
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM radcheck
WHERE Username = 'jwardlaw' ORDER BY id'<br>
rlm_sql (sql): Reserving sql socket id: 3<br>
rlm_sql: Failed to create the pair: Unknown attribute "Total-Time-Limit"<br>
rlm_sql (sql): Error getting data from database<br>
rlm_sql (sql): SQL query error; rejecting user<br>
rlm_sql (sql): Released sql socket id: 3<br>
modcall[authorize]: module "sql" returns fail for<br>
<br>
and the result when I put that SELECT statement in mysql is:<br>
<br>
mysql> SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
Username = 'jwardlaw' ORDER BY id<br>
-> ;<br>
+------+----------+------------------+-----------+----+<br>
| id | UserName | Attribute | Value | op |<br>
+------+----------+------------------+-----------+----+<br>
| 1042 | jwardlaw | Password | XXXX | := |<br>
| 1043 | jwardlaw | Simultaneous-Use | 1 | := |<br>
| 1044 | jwardlaw | Total-Time-Limit | 2520000 | := |<br>
+------+----------+------------------+-----------+----+<br>
3 rows in set (0.00 sec)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Stefan Winter wrote:
<blockquote cite="mid200610242112.53364.stefan.winter@restena.lu"
type="cite">
<blockquote type="cite">
<pre wrap="">+------+----------+------------------+--------+----+
| 1118 | mpearson | Password | XXXX| == |
| 1119 | mpearson | Simultaneous-Use | 1 | == |
+------+----------+------------------+--------+----+
2 rows in set (0.29 sec)
</pre>
</blockquote>
<pre wrap=""><!---->
You want to force the user to only have one login session. Then you have to
*set* Simultaneous-Use, by using the operator :=. The way it's in the db
right now would only match the user if the incoming packet already contained
an attribute Simultaneus-Use and if this attribute's value was 1 (because ==
is a check item, i.e. it compares things in the packet, it doesn't set
anything).
So, change the operator (BTW: for both entries, IIRC, Password or
User-Password should be _set_ with :=). That should work much better.
</pre>
<blockquote type="cite">
<pre wrap="">Also I went down through the debug of radisud and put in the select
statments from I didn't get any results from:
</pre>
</blockquote>
<pre wrap=""><!---->
That's okay, it's no problem if they are entry. They could cause trouble if
they were non-empty and filled with rubbish, that's why I wanted you to check
them too.
Greetings,
Stefan
</pre>
</blockquote>
<br>
</body>
</html>