mysql - How to give a date of start for users on Freeradius -


i want able delay activation of login. example can create user monday, want allow him connect friday logon on network.

so created attribute on file dictionary.conf

attribute      acc-start-date           3003    date 

this attribute used in databse sql attribute

and in /site-available/default in authorise section

if (acc-start-date < "%{current-time}") {             reject     } 

but error,

    rad_recv: access-request packet host 127.0.0.1 port 58341, id=131, length=277     chillispot-version = "1.3.0"     user-name = "date"     user-password = "date"     service-type = login-user     acct-session-id = "556ea52d00000004"     framed-ip-address = 10.10.4.200     nas-port-type = wireless-802.11     nas-port = 4     nas-port-id = "00000004"     calling-station-id = "00-1b-77-16-34-1a"     called-station-id = "00-50-56-b2-bf-8d"     nas-ip-address = 10.10.4.254     nas-identifier = "vlan4"     wispr-location-id = "isocc=,cc=,ac=,network=coova,vlan4_ssid"     wispr-location-name = "vlan_4"     wispr-logoff-url = "http://10.10.4.254:3990/logoff"     message-authenticator = 0x96a538a9ed829e695c3d62f22e5d1962 wed jun  3 08:57:48 2015 : info: # executing section authorize file /etc/freeradius/sites-enabled/default wed jun  3 08:57:48 2015 : info: +- entering group authorize {...} wed jun  3 08:57:48 2015 : info: ++? if (!nas-ip-address) wed jun  3 08:57:48 2015 : info: ? evaluating !(nas-ip-address) -> false wed jun  3 08:57:48 2015 : info: ++? if (!nas-ip-address) -> false wed jun  3 08:57:48 2015 : info: ++[preprocess] returns ok wed jun  3 08:57:48 2015 : info: ++[chap] returns noop wed jun  3 08:57:48 2015 : info: ++[mschap] returns noop wed jun  3 08:57:48 2015 : info: ++[digest] returns noop wed jun  3 08:57:48 2015 : info: [suffix] no '@' in user-name = "date", looking realm null wed jun  3 08:57:48 2015 : info: [suffix] no such realm "null" wed jun  3 08:57:48 2015 : info: ++[suffix] returns noop wed jun  3 08:57:48 2015 : info: [eap] no eap-message, not doing eap wed jun  3 08:57:48 2015 : info: ++[eap] returns noop wed jun  3 08:57:48 2015 : info: [sql]  expand: %{user-name} -> date wed jun  3 08:57:48 2015 : info: [sql] sql_set_user escaped user --> 'date' wed jun  3 08:57:48 2015 : debug: rlm_sql (sql): reserving sql socket id: 3 wed jun  3 08:57:48 2015 : info: [sql]  expand: select id, username, attribute, value, op           radcheck           username = '%{sql-user-name}'           order id -> select id, username, attribute, value, op           radcheck           username = 'date'           order id wed jun  3 08:57:48 2015 : info: [sql] user found in radcheck table wed jun  3 08:57:48 2015 : info: [sql]  expand: select id, username, attribute, value, op           radreply           username = '%{sql-user-name}'           order id -> select id, username, attribute, value, op           radreply           username = 'date'           order id wed jun  3 08:57:48 2015 : info: [sql]  expand: select groupname           usergroup           username = '%{sql-user-name}'           order priority -> select groupname           usergroup           username = 'date'           order priority wed jun  3 08:57:48 2015 : info: [sql]  expand: select id, groupname, attribute,           value, op           radgroupcheck           groupname = '%{sql-group}'           order id -> select id, groupname, attribute,           value, op           radgroupcheck           groupname = 'date_check'           order id wed jun  3 08:57:48 2015 : info: [sql] user found in group date_check wed jun  3 08:57:48 2015 : info: [sql]  expand: select id, groupname, attribute,           value, op           radgroupreply           groupname = '%{sql-group}'           order id -> select id, groupname, attribute,           value, op           radgroupreply           groupname = 'date_check'           order id wed jun  3 08:57:48 2015 : debug: rlm_sql (sql): released sql socket id: 3 wed jun  3 08:57:48 2015 : info: ++[sql] returns ok wed jun  3 08:57:48 2015 : debug: rlm_sqlcounter: entering module authorize code wed jun  3 08:57:48 2015 : debug: rlm_sqlcounter: not find check item value pair wed jun  3 08:57:48 2015 : info: ++[chillispot_max_bytes] returns noop wed jun  3 08:57:48 2015 : debug: rlm_sqlcounter: entering module authorize code wed jun  3 08:57:48 2015 : debug: rlm_sqlcounter: not find check item value pair wed jun  3 08:57:48 2015 : info: ++[noresetcounter] returns noop wed jun  3 08:57:48 2015 : debug: rlm_sqlcounter: entering module authorize code wed jun  3 08:57:48 2015 : debug: rlm_sqlcounter: not find check item value pair wed jun  3 08:57:48 2015 : info: ++[dailycounter] returns noop wed jun  3 08:57:48 2015 : info: ++? if (acc-start-date < "%{current-time}") wed jun  3 08:57:48 2015 : info:    expand: %{current-time} ->  wed jun  3 08:57:48 2015 : info:     (attribute acc-start-date not found) wed jun  3 08:57:48 2015 : info: ? evaluating (acc-start-date < "%{current-time}") -> false wed jun  3 08:57:48 2015 : info: ++? if (acc-start-date < "%{current-time}") -> false wed jun  3 08:57:48 2015 : info: ++[expiration] returns noop wed jun  3 08:57:48 2015 : info: ++[logintime] returns noop wed jun  3 08:57:48 2015 : info: ++[pap] returns updated 

my freeradius can't find attribut, should write somewhere query sql find attribute ?

you might want add in policy.conf , not default

if (acc-start-date < "%{current-time}") {                 reject         }  

Comments