On Tue, 22 Feb 2005, Antonio J. Soler wrote:
Hello,
We have set up a radius server to manage user access from a hotel. Users are connected via PLC or WiFi. By now, we are using freeradius 1.0.1 running on a Debian 3.0 r3, and rlm_mysql module.
I'd like to know if there is some way to clean a user from the database one day after his first connection, or at least reject him.
What we want is, for example: - A user called "user1" is created on January 1st. - This user first logs in on January 5th at 11:00 am. - We want this user to be rejected (if there is some way to clean him from the auth-users database it would be great) from January 6th at 11:00, regardless the time he has been logged in. That is: One day after his first connection.
Since you 're using sql you could the following. When creating a user, add a Post-Auth-Type = set_expire attribute in the user entry. Then create a corresponding Post-Auth-Type subsection in the postauth section where you 'll add two mysql module instances. The first one will take care of removing the Post-Auth-Type attribute from the user entry and the second will add an Expiration attribute with a calculated value of login_day+1day. You will need to edit the postauth_query in the module instances to achieve that. Afterwards, you can schedule a cron job which will delete all user accounts with an Expiration older than current_time.
I've been reading info about Expiration item and the rlm_sqlcounter module, but they seem to be of no help.
Thanks in advance, -- Antonio J. Soler Admin. de red Plug-On S.L. Web: www.plug-on.net E-mail: [EMAIL PROTECTED]
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Kostas Kalevras Network Operations Center [EMAIL PROTECTED] National Technical University of Athens, Greece Work Phone: +30 210 7721861 'Go back to the shadow' Gandalf
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html