- 论坛徽章:
- 0
|
freeradius 2.1.8
使用了楼上的方法后,仍然不起作用阿,还算多台机器,相同帐号可以登录。。
发下配置文件:
#######################################################################
# Simultaneous Use Checking Queries
#######################################################################
# simul_count_query - query for the number of current connections
# - If this is not defined, no simultaneouls use checking
# - will be performed by this module instance
# simul_verify_query - query to return details of current connections for verification
# - Leave blank or commented out to disable verification step
# - Note that the returned field order should not be changed.
#######################################################################
# Uncomment simul_count_query to enable simultaneous use checking
simul_count_query = "SELECT COUNT(*) FROM ${acct_table1} WHERE username = '%{SQL-User-Name}' AND acctstoptime IS NULL"
#返回在线用户。。
simul_verify_query = "SELECT radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress,callingstationid, framedprotocol FROM #
${acct_table1} WHERE username = '%{SQL-User-Name}' AND acctstoptime IS NULL"
-----------------
mysql> select * from radgroupcheck;
+----+-----------+------------------+----+-------+
| id | groupname | attribute | op | value |
+----+-----------+------------------+----+-------+
| 2 | user | Simultaneous-Use | := | 1 |
+----+-----------+------------------+----+-------+
1 row in set (0.02 sec)
mysql>
------------------------ |
|