W dniu 10.05.2012 23:19, lists@kaszebe.eu napisał(a):
Jest sobie freeradius + baza LMS mysql oraz koncentrator pppoe na MT ROS 5.15 Dodany wpis "$INCLUDE /usr/share/freeradius/dictionary.mikrotik" w /usr/share/freeradius/dictionary.mikrotik Plik dictionary.mikrotik ściągnięty od mikrotika.
Fragment radius-sql.conf wygląda mniej więcej tak:
authorize_check_query = \ "SELECT n.id AS id , upper(m.mac) AS UserName, 'Cleartext-Password' AS Attribute, passwd AS Value, ':=' AS op \ FROM nodes n \ JOIN macs m ON (m.nodeid = n.id) \ WHERE \ upper(m.mac) = '%{User-Name}' AND n.access=1 ORDER BY n.id"
authorize_reply_query = \ "SELECT n.id AS id, upper(m.mac) AS UserName, 'Framed-IP-Address' Attribute, inet_ntoa(n.ipaddr) AS Value, ':=' AS op \ FROM nodes n \ JOIN macs m ON (m.nodeid = n.id) \ WHERE \ upper(m.mac) = '%{User-Name}' \ UNION \ SELECT n.id id, upper(m.mac) UserName, 'Mikrotik-Rate-Limit' Attribute, '1024k/1024k' Value, "==" op \ FROM nodes n \ JOIN macs m ON (m.nodeid = n.id) \ WHERE \ upper(m.mac) = '%{User-Name}'"
A dlaczego tutaj jako op "=="?