This is freeradius mail list so maybe you should ask them on the other place... For more info, please take a look on sql howto available on fr wiki. Best regards On Tue, May 27, 2008 at 11:15 AM, gaetano ortisi <gaetanoortisi@yahoo.it> wrote:
Hello, 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. Suggestions? Links? Thanks, tano
------------------------------ Scopri il Blog di Yahoo! Mail<http://us.rd.yahoo.com/mail/it/taglines/yahoo/ymail/SIG=11djrg460/**http%3A%2F%2Fwww.ymailblogit.com%2Fblog%2F>: trucchi, novità, consigli... e la tua opinione!
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html