I've freeradius server which uses MySQL to store the data.
following is my database
radcheck table
+-----+----------+--------------------+----+--------------+
| id | username | attribute | op | value |
+-----+----------+--------------------+----+--------------+
| 474 | varun | Cleartext-Password | := | sunshine3003 |
+-----+----------+--------------------+----+--------------+
radreply table
+----+----------+--------------+----+-------+
| id | username | attribute | op | value |
+----+----------+--------------+----+-------+
| 1 | varun | Fall-Through | = | Yes |
+----+----------+--------------+----+-------+
radgroupcheck table
+----+-----------+-----------+----+-------+
| id | groupname | attribute | op | value |
+----+-----------+-----------+----+-------+
| 1 | group1 | Auth-Type | := | PAP |
| 2 | eapgroup | Auth-Type | := | EAP |
+----+-----------+-----------+----+-------+
radusergroup table
+----------+-----------+----------+
| username | groupname | priority |
+----------+-----------+----------+
| varun | eapgroup | 1 |
| varun | group1 | 2 |
+----------+-----------+----------+
We have two different clients which uses two different Authentication types with free radius , One uses PAP
and sends the Password in User-Password
attribute.
and another client user EAP
and sends the password in EAP-Message
and Message-Authenticator
What i want is, when PAP fails to authenticate or when User-Password
attribute is not present it should use EAP
as Auth-Type
and if EAP
and Message-Authenticator
are not present in radius attribute it should reply with Access-reject or Authentication failure message.
Any help will be appreciated