<DIV style="font-family:Arial, sans-serif; font-size:10pt;"><FONT size="2" style="font-family: Arial, sans-serif;">Forgive me as it's been quite some time since I've had to do any heavy duty Radiator config. </FONT><DIV style="font-family: Arial, sans-serif;"><FONT size="2"><BR></FONT></DIV><DIV style="font-family: Arial, sans-serif;"><FONT size="2">We are getting ready to start testing a new Fiber Service in our hometown.  My boss did the initial config in FREERADIUS.  He has a database structure he wants to use, here's how things will go.  Our client CPE will send a mac address as a username with no password.  I want to look in my database table (called radcheck) to see if their value is set to accept.  IF so, I will authenticate them.  If not I need to send an access reject.... How do I do that. Here is what my table looks like: </FONT></DIV><DIV style="font-family: Arial, sans-serif;"><FONT size="2"><BR></FONT></DIV><DIV style=""><FONT face="Arial, sans-serif" size="2"><DIV style="">MariaDB [radius]> select * from radcheck;</DIV><DIV style="">+----+-------------------+--------------------+----+--------------+</DIV><DIV style="">| id | username          | attribute          | op | value        |</DIV><DIV style="">+----+-------------------+--------------------+----+--------------+</DIV><DIV style="">|  1 | radiustest        | Cleartext-Password | := | testpassword |</DIV><DIV style="">|  2 | 8C:C1:21:A4:39:89 | Auth-Type          | := | Accept       |</DIV><DIV style="">+----+-------------------+--------------------+----+--------------+</DIV><DIV style=""><BR></DIV><DIV style="">Here's a trace 4 debug of my auth file on my test machine.  I am using radpwtst with no password provided: </DIV><DIV style=""><BR></DIV><DIV style=""><BR></DIV><DIV style=""><DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Packet dump:</DIV><DIV>*** Received from 127.0.0.1 port 54661 ....</DIV><DIV>Code:       Access-Request</DIV><DIV>Identifier: 223</DIV><DIV>Authentic:  <254>4.<16><226><228><165><238>yA<133>J<142><191><220>C</DIV><DIV>Attributes:</DIV><DIV><SPAN style="white-space:pre">  </SPAN>User-Name = "8C:C1:21:A4:39:89"</DIV><DIV><SPAN style="white-space:pre">     </SPAN>Service-Type = Framed-User</DIV><DIV><SPAN style="white-space:pre">    </SPAN>NAS-IP-Address = 127.0.0.1</DIV><DIV><SPAN style="white-space:pre">    </SPAN>NAS-Identifier = "127.0.0.1"</DIV><DIV><SPAN style="white-space:pre">        </SPAN>NAS-Port = 1234</DIV><DIV><SPAN style="white-space:pre">       </SPAN>Called-Station-Id = "123456789"</DIV><DIV><SPAN style="white-space:pre">     </SPAN>Calling-Station-Id = "987654321"</DIV><DIV><SPAN style="white-space:pre">    </SPAN>NAS-Port-Type = Async</DIV><DIV><SPAN style="white-space:pre"> </SPAN>User-Password = <168>SH<205><171><207><137><21>y<239><20><224>u<144><246>K</DIV><DIV><BR></DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Handling request with Handler 'Client-Identifier=Fast-Fiber', Identifier ''</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Handling with Radius::AuthSQL: Fast-Fiber</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Handling with Radius::AuthSQL: Fast-Fiber</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Connecting to 'dbi:mysql:hostname=localhost;database=radius Connection id: 0-00000'</DIV><DIV><BR></DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Query to 'dbi:mysql:hostname=localhost;database=radius Connection id: 0-00000': 'select username, value from radcheck where username='8C:C1:21:A4:39:89' and value = Accept':</DIV><DIV>Fri Apr 20 11:00:58 2018: ERR: Execute failed for 'select username, value from radcheck where username='8C:C1:21:A4:39:89' and value = Accept': Unknown column 'Accept' in 'where clause'</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Connecting to 'dbi:mysql:hostname=localhost;database=radius Connection id: 0-00000'</DIV><DIV><BR></DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Query to 'dbi:mysql:hostname=localhost;database=radius Connection id: 0-00000': 'select username, value from radcheck where username='8C:C1:21:A4:39:89' and value = Accept':</DIV><DIV>Fri Apr 20 11:00:58 2018: ERR: Execute failed for 'select username, value from radcheck where username='8C:C1:21:A4:39:89' and value = Accept': Unknown column 'Accept' in 'where clause'</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Radius::AuthSQL looks for match with 8C:C1:21:A4:39:89 [8C:C1:21:A4:39:89]</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Radius::AuthSQL REJECT: No such user: 8C:C1:21:A4:39:89 [8C:C1:21:A4:39:89]</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: AuthBy SQL result: REJECT, No such user</DIV><DIV>Fri Apr 20 11:00:58 2018: INFO: Access rejected for 8C:C1:21:A4:39:89: No such user</DIV><DIV>Fri Apr 20 11:00:58 2018: DEBUG: Packet dump:</DIV><DIV>*** Sending to 127.0.0.1 port 54661 ....</DIV><DIV>Code:       Access-Reject</DIV><DIV>Identifier: 223</DIV><DIV>Authentic:  <200><31>t<184><144><213><234><183>0<19><211>@<178><13><240><194></DIV><DIV>Attributes:</DIV><DIV><SPAN style="white-space:pre">      </SPAN>Reply-Message = "Request Denied"</DIV></DIV><DIV><BR></DIV><DIV>Here's my AuthBy Statement: </DIV><DIV><BR></DIV><DIV><DIV><AuthBy SQL></DIV><DIV><SPAN style="white-space:pre">  </SPAN>Identifier Fast-Fiber</DIV><DIV><SPAN style="white-space:pre"> </SPAN>DBSource dbi:mysql:hostname=localhost;database=radius</DIV><DIV><SPAN style="white-space:pre"> </SPAN>DBUsername user</DIV><DIV><SPAN style="white-space:pre">       </SPAN>DBAuth secretpass</DIV><DIV><SPAN style="white-space:pre">     </SPAN>FailureBackoffTime 5</DIV><DIV><SPAN style="white-space:pre">  </SPAN>NoDefault</DIV><DIV><SPAN style="white-space:pre">     </SPAN>Timeout 10</DIV><DIV><SPAN style="white-space: pre;">  </SPAN>#AuthSelect select value where USERNAME='%n'</DIV><DIV>        AuthSelect select username, value from radcheck where username=%0 and value = Accept</DIV><DIV></AuthBy></DIV></DIV><DIV><BR></DIV><DIV>If anybody could point me in the right direction I'd appreciate it!  </DIV><DIV><BR></DIV><DIV>I have another question too, currently we have a seperate table setup with reply attributes (multiples).  The table name is radreply and it's structure looks something like this: </DIV><DIV><BR></DIV><DIV>Dynamic IP:</DIV><DIV><DIV>Id            username                           attribute                              op           value</DIV><DIV>1              8C:C1:21:A4:39:89            Mikrotik-Rate-Limit         :=            25M/50M 0/0 0/0 0/0 8</DIV><DIV>2              8C:C1:21:A4:39:89            Mikrotik-Address-List     :=            permitted_users</DIV><DIV>3              8C:C1:21:A4:39:89            Session-Timeout              :=            60</DIV><DIV>4              8C:C1:21:A4:39:89            Framed-Pool                      :=            users_pool</DIV></DIV><DIV><BR></DIV><DIV>Static IP: </DIV><DIV><DIV>Id            username                           attribute                              op           value</DIV><DIV>1              8C:C1:21:A4:39:89            Mikrotik-Rate-Limit         :=            25M/50M 0/0 0/0 0/0 8</DIV><DIV>2              8C:C1:21:A4:39:89            Mikrotik-Address-List     :=            permitted_users</DIV><DIV>3              8C:C1:21:A4:39:89            Session-Timeout              :=            60</DIV><DIV>4              8C:C1:21:A4:39:89            Framed-IP-Address         :=            192.168.2.10</DIV></DIV><DIV><BR></DIV><DIV>What do I do to select and reply back with those bad boys? </DIV><DIV><BR></DIV><DIV>Best,</DIV><DIV><BR></DIV><DIV>Brandon Shiers</DIV><DIV><BR></DIV></DIV></FONT></DIV></DIV>