Simultaneous-Use problem on freeradius 0.4

2002-04-11 Thread Cristian Bica

I'm using freeradius 0.4 with mysql 3.23.41 on SuSE Linux 7.3 for auth. of
dial-up users on an livingston protmaster 2e.
The problem:
 i added all users into a group PPP
 i set the Simultaneous-Use to 1
 when a user is connected and another connection is requested by the same
user then connection is accepted the first instance of the user is removed
from the "radutmp" file so i see only one instance of the user with "radwho"
but when i'm looking at the portmaster i see 2 users connected with the same
username

here's some part from "radiusd.conf"
authorize {
preprocess
suffix
sql
counter
}
authenticate {
sql
}
accounting {
detail
counter
unix
radutmp
sql
}
session {
radutmp
}

sql.conf
authorize_check_query = "SELECT id,UserName,Attribute,Value,op FROM
${authcheck_table} WHERE Username = '%{SQL-User-Name}' ORDER BY id"
authorize_reply_query = "SELECT id,UserName,Attribute,Value,op FROM
${authreply_table} WHERE Username = '%{SQL-User-Name}' ORDER BY id"
authorize_group_check_query = "SELECT
${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Att
ribute,${groupcheck_table}.Value,${groupcheck_table}.op FROM
${groupcheck_table},${usergroup_table} WHERE ${usergroup_table}.Username =
'%{SQL-User-Name}' AND ${usergroup_table}.GroupName =
${groupcheck_table}.GroupName ORDER BY ${groupcheck_table}.id"
authorize_group_reply_query = "SELECT
${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Att
ribute,${groupreply_table}.Value,${groupreply_table}.op FROM
${groupreply_table},${usergroup_table} WHERE ${usergroup_table}.Username =
'%{SQL-User-Name}' AND ${usergroup_table}.GroupName =
${groupreply_table}.GroupName ORDER BY ${groupreply_table}.id"
authenticate_query = "SELECT Value,Attribute FROM ${authcheck_table} WHERE
UserName = '%{User-Name}' AND ( Attribute = 'Password' OR Attribute =
'Crypt-Password' ) ORDER BY Attribute DESC"


MySQL Databases
radcheck
 id   UserNameAttribute  Value op
-
252 user  Password pass   :=

radgroupcheck
 id   GroupNameAttribute   Value op


252 PPP  Simultaneous-Use1   :=
radgroupreply
id GroupNameAttribute   Value
op


13PPP  Framed-ProtocolPPP
:=
12PPP  Service-Type Framed-User
:=
14PPP  Framed-IP-Addressx.x.x.x+
:=
15PPP  Framed-Compression,Van-Jacobson-TCP-IP
:=

usergroup
id username groupname
---
1 user  PPP


 THANKS


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



Simultaneous-Use problem

2002-04-10 Thread Cristian Bica


I'm using freeradius 
0.4 with mysql 3.23.41 on SuSE Linux 7.3 for auth. of dial-up users on an 
livingston protmaster 2e.The problem: i added all users into a 
group PPP i set the Simultaneous-Use to 1 when a user is 
connected and another connection is requested by the same user then connection 
is accepted the first instance of the user is removed from the "radutmp" file so 
i see only one instance of the user with "radwho" but when i'm looking at the 
portmaster i see 2 users connected with the same usernamehere's some 
part from "radiusd.conf"authorize 
{    
preprocess    
suffix    
sql    
counter    }authenticate 
{    
sql}accounting {    
detail    
counter    
unix    
radutmp    sql}session 
{    
radutmp}sql.confauthorize_check_query = "SELECT 
id,UserName,Attribute,Value,op FROM ${authcheck_table} WHERE Username = 
'%{SQL-User-Name}' ORDER BY id"authorize_reply_query = "SELECT 
id,UserName,Attribute,Value,op FROM ${authreply_table} WHERE Username = 
'%{SQL-User-Name}' ORDER BY id"authorize_group_check_query = "SELECT 
${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Attribute,${groupcheck_table}.Value,${groupcheck_table}.op 
FROM ${groupcheck_table},${usergroup_table} WHERE ${usergroup_table}.Username = 
'%{SQL-User-Name}' AND ${usergroup_table}.GroupName = 
${groupcheck_table}.GroupName ORDER BY 
${groupcheck_table}.id"authorize_group_reply_query = "SELECT 
${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Attribute,${groupreply_table}.Value,${groupreply_table}.op 
FROM ${groupreply_table},${usergroup_table} WHERE ${usergroup_table}.Username = 
'%{SQL-User-Name}' AND ${usergroup_table}.GroupName = 
${groupreply_table}.GroupName ORDER BY 
${groupreply_table}.id"authenticate_query = "SELECT Value,Attribute FROM 
${authcheck_table} WHERE UserName = '%{User-Name}' AND ( Attribute = 'Password' 
OR Attribute = 'Crypt-Password' ) ORDER BY Attribute DESC"MySQL 
Databasesradcheck id   
UserName    
Attribute  Value 
op-252 
user  
Password pass   := 
radgroupcheck id   
GroupName    
Attribute   
Value 
op252 
PPP  
Simultaneous-Use    
1   := 
radgroupreplyid 
GroupName    
Attribute   
Value  
op13    
PPP  
Framed-Protocol    
PPP    
:=12    
PPP  
Service-Type 
Framed-User 
:=14    
PPP  
Framed-IP-Address    
x.x.x.x+   
:=15    
PPP  
Framed-Compression    
,Van-Jacobson-TCP-IP    
:=usergroupid username 
groupname---1 
user  PPP  
 THANKS