mysql queries help needed
tnt at kalik.net
Tue May 27 12:15:53 CEST 2008
First things first:
Kalik Informatika ISP
Dana 27/5/2008, "gaetano ortisi" <gaetanoortisi at yahoo.it> piše:
>I am developing a small project to manage accounts provided by a captive
>portal solution chillispot-freeradius-mysql, and I need help about working with
>sql tables to do those few tasks the web interface should provide to admin users.
>I need to know how to:
>- add an account
>- remove an account
>- show all accounts with the total time of all their connections
>>From what I understand, add an account is simple, all I have to do is add a record
>to radcheck table like after checked that the username is not already present:
>mysql> select username from radcheck where username = 'John Doe';
>(if 0 rows returned, continue)
>mysql> insert into radcheck (username, attribute, value) values ('John Doe', 'Password', 'x2jadfds');
>However in an example from the oreilly book that the op is left as the default value ('=='),
>while in another software that do a task like what I what should like to do (phpmyprepaid),
>the attribute is "User-Password", and the op is ":=". What difference?
>To remove an account, I should delete all the records in radcheck that have the username
>I want to remove, so:
>mysql> delete from radcheck where username = 'John Doe';
>But I would like to know, if the user has currently a session active, i.e.
>it is connected to the service provided, it is immediately disconnected or
>the session continue?
>And moreover, I have some problems with radacct.
>How to do the last task?
>On the web I found few resources about manage freeradius with mysql.
>Scopri il Blog di Yahoo! Mail: trucchi, novitĂ , consigli... e la tua opinione!
More information about the Freeradius-Users