about simultaneous when using mysql and freeradius
Marinko Tarlac
mangia81 at gmail.com
Tue Jun 1 11:45:54 CEST 2010
I already wrote about this problem on this list. Please search before
asking...
Spacelee wrote:
>
> i want to limit user's behavior, such as a username can login only
> once at the same time...
>
> 1、modifiy default and inner-tunnel in
>
> # Session database, used for checking Simultaneous-Use. Either the
> radutmp
> # or rlm_sql module can handle this.
> # The rlm_sql module is *much* faster
> session {
> #radutmp
>
> # See "Simultaneous Use Checking Querie" in sql.conf
> sql
>
> }
> 2、modify dialup.conf in etc/raddb/sql/mysql
>
> # 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"
>
> 3、add a entry to the table radgorucheck
> INSERT INTO `radgroupcheck` ( `id` , `GroupName` , `Attribute` , `op`
> , `Value` )
> VALUES (
> NULL , ’user’, ’Simultaneous-Use’, ’:=’, ’1’
> );
>
> 4. update the user "test" to the group "user"
>
>
> i finally tried successfully, but if , i say if the radius server was
> down suddenly or the user logout improperly(such as he poweroff the
> computer directly). then the record will still be record in the table
> as he was still online ...so we need to modify the record, but how to
> ? can freeradius judge it by itself, or how to judge the user if offline ?
>
> --
> Spacelee
>
>
>
> --
> Spacelee
> ------------------------------------------------------------------------
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list