is there normal way to create a user that can not log on until a future date?

A.L.M.Buxey at lboro.ac.uk A.L.M.Buxey at lboro.ac.uk
Tue May 27 10:27:09 CEST 2008


Hi,

> I think I can probably do it with the SQL interface by only selecting from 
> 'check
> records' that are current but is there a 'proper' way to do this?
> Surely a dialup ISP would set a 'start date', before which a user can not 
> log in?

add another table eg validity, then put eg this into it:

 id         | int(11)     | NO   | PRI | NULL    | auto_increment |
 UserName   | varchar(60) | YES  |     | NULL    |                |
 start_date | datetime    | YES  |     | NULL    |                |
 end_date   | datetime    | YES  |     | NULL    |                |

then either use SQL or eg PERL to run a quick authorize check

eg validity.start_date <= NOW() and validity.end_date >= NOW()

etc.  a basic test can be squeezed into 1.1.x or 2.0.x - something
a little more inline and streamlines can be done in unlang


another option - touched on by others, is to generate a new account
on the flu each day - if you can access the till system via the
RADIUS server then it could add the username details etc to
the till after its generated. 

alan



More information about the Freeradius-Users mailing list