Unix TimeStamp Based Login

jomajo ster.efx at gmail.com
Mon May 14 14:29:58 CEST 2012


I found this disscussion
freeradius.1045715.n5.nabble.com/Opposite-of-Expiraton-attribute-td4497694.html
. 

I have a problem at this point now:

# Executing section authorize from file
/etc/freeradius/sites-enabled/default
+- entering group authorize {...}
        expand:  %m-%d-%Y ->  05-14-2012
++[request] returns notfound
[sql]   expand: %{User-Name} -> 12345
[sql] sql_set_user escaped user --> '12345'
rlm_sql (sql): Reserving sql socket id: 3
[sql]   expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id
-> SELECT id, username, attribute, value, op           FROM radcheck          
WHERE username = '12345'           ORDER BY id
rlm_sql: Failed to create the pair: Invalid octet string "2012-05-14
00:00:00 " for attribute name "Current-Date"
rlm_sql (sql): Error getting data from database
[sql] SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 3
++[sql] returns fail
Using Post-Auth-Type Reject
# Executing group from file /etc/freeradius/sites-enabled/default
+- entering group REJECT {...}
[sql]   expand: %{User-Name} -> 12345
[sql] sql_set_user escaped user --> '12345'
[sql]   expand: %{User-Password} -> 12345
[sql]   expand: INSERT INTO radpostauth                           (username,
pass, reply, authdate)                           VALUES (                          
'%{User-Name}',                          
'%{%{User-Password}:-%{Chap-Password}}',                          
'%{reply:Packet-Type}', '%S') -> INSERT INTO radpostauth                          
(username, pass, reply, authdate)                           VALUES (                          
'12345',                           '12345',                          
'Access-Reject', '2012-05-14 15:23:38')
rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth                          
(username, pass, reply, authdate)                           VALUES (                          
'12345',                           '12345',                          
'Access-Reject', '2012-05-14 15:23:38')
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql (sql): Released sql socket id: 2
++[sql] returns ok

My radcheck table:

http://freeradius.1045715.n5.nabble.com/file/n5708939/radcheck.png 

I tried different Current-Date attribute variations, but there was no
success. As I understand, we first, can authenticate user by specific date
with Current-Date attribute, and then at specific time , with Login-Time
attribute?

--
View this message in context: http://freeradius.1045715.n5.nabble.com/Unix-TimeStamp-Based-Login-tp5708187p5708939.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.


More information about the Freeradius-Users mailing list