Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
f11:technik:raspberrypi:hotspotdm3kb:raspeasyhpdb [2014/12/05 17:47] dm3kb |
f11:technik:raspberrypi:hotspotdm3kb:raspeasyhpdb [2019/09/29 12:03] (aktuell) |
||
|---|---|---|---|
| Zeile 64: | Zeile 64: | ||
| Erase all Radius information from " | Erase all Radius information from " | ||
| create the tables needed for EASY-Hotspot.\\ | create the tables needed for EASY-Hotspot.\\ | ||
| - | ehs_noraddata_0.2p3.sql can be found in: / | + | ehs_noraddata_0.2p3.sql can be found in: / |
| + | Copy it to e.g. database_HP-only-NoRadius-NoData.sql | ||
| + | and use vi to earse all radius related operations\\ | ||
| + | \\ | ||
| + | Then use this file to create the EASY-Hotspot tables in the same DB that already contain the FreeRadius tabels.\\ | ||
| + | \\ | ||
| < | < | ||
| root@raspberrypi: | root@raspberrypi: | ||
| Zeile 73: | Zeile 77: | ||
| ==Check tables== | ==Check tables== | ||
| - | + | Check what tables have been created: | |
| < | < | ||
| mysql -u root -p easyhpradiusdb | mysql -u root -p easyhpradiusdb | ||
| Zeile 116: | Zeile 119: | ||
| ==Set DB-User Permissions== | ==Set DB-User Permissions== | ||
| - | As we skipped Admin.sql no radius user has been created. To split responsibilities, | + | As we skipped |
| **Note:** __First it is explained step by step a bit below all commands are listed as a Copy & paste block!!__ | **Note:** __First it is explained step by step a bit below all commands are listed as a Copy & paste block!!__ | ||
| - | Start with creating the easyhotspot user: | + | Start with creating the |
| < | < | ||
| mysql -u root -p | mysql -u root -p | ||
| - | Enter password: | + | Enter password: |
| mysql> | mysql> | ||
| Zeile 175: | Zeile 178: | ||
| + | # Grant usage for radius | ||
| mysql> GRANT SELECT ON easyhpradiusdb . radcheck TO ' | mysql> GRANT SELECT ON easyhpradiusdb . radcheck TO ' | ||
| Query OK, 0 rows affected (0.01 sec) | Query OK, 0 rows affected (0.01 sec) | ||
| Zeile 209: | Zeile 213: | ||
| < | < | ||
| mysql -u root -p | mysql -u root -p | ||
| - | Enter password: | + | Enter password: |
| CREATE USER ' | CREATE USER ' | ||
| Zeile 236: | Zeile 240: | ||
| FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
| + | # Grant usage for radius | ||
| GRANT SELECT ON easyhpradiusdb . radcheck TO ' | GRANT SELECT ON easyhpradiusdb . radcheck TO ' | ||
| Zeile 277: | Zeile 282: | ||
| - | <del>==Create a user to test radius login== | + | ==Create a user to test radius login== |
| + | < | ||
| + | This user is not managed via Easy-Hotspot, | ||
| - | This user is not managed via Easy-Hotspot, | ||
| < | < | ||
| echo " | echo " | ||
| </ | </ | ||
| - | Check new user entry in table radcheck | + | <del>Check new user entry in table radcheck\\</ |
| < | < | ||
| mysql> select * from radcheck where username=' | mysql> select * from radcheck where username=' | ||
| Zeile 294: | Zeile 300: | ||
| 1 row in set (0.01 sec) | 1 row in set (0.01 sec) | ||
| </ | </ | ||
| - | </ | + | |
| ==Create User via EasyHP Admin GUI== | ==Create User via EasyHP Admin GUI== | ||
| - | Log in to: | + | |
| + | Log in to: | ||
| for the first tests. | for the first tests. | ||
| - | ==Check / Change Freeradius shared secret == | + | ==Check / Change Freeradius shared secret== |
| Default is " | Default is " | ||
| In case of using a different secret change password, as we have configured above of radius user in mysql, change secret in Free-Radius config. | In case of using a different secret change password, as we have configured above of radius user in mysql, change secret in Free-Radius config. | ||
| Zeile 343: | Zeile 350: | ||
| </ | </ | ||
| + | If you see the reply from Radius that an Access-Accept packet is received the Radius is operational. | ||
| Zeile 349: | Zeile 356: | ||
| - | Additional: Only if something went wrong and a restart is necessary: Drop DB and User: | + | **Additional:** Only if something went wrong and a restart is necessary: Drop DB and User: |
| < | < | ||
| Zeile 368: | Zeile 375: | ||
| </ | </ | ||
| - | |||
| - | ===Start RADIUS in debug mode:=== | ||
| - | < | ||
| - | freeradius -X | ||
| - | </ | ||
| - | Dont panic, tons of output will run over the screen, but important is that after some time \\ | ||
| - | a line named: **Ready to process requests.** is displayed\\ | ||
| - | Now login on another terminal and test radius communication with MySQL by requesting login-Infor for user1 with pw passwd123 on localhost 1812 and secret RaspiRadi1234: | ||
| - | < | ||
| - | root@raspberrypi: | ||
| - | Sending Access-Request of id 35 to 127.0.0.1 port 1812 | ||
| - | User-Name = " | ||
| - | User-Password = " | ||
| - | NAS-IP-Address = 127.0.1.1 | ||
| - | NAS-Port = 0 | ||
| - | Message-Authenticator = 0x00000000000000000000000000000000 | ||
| - | rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=35, length=20 | ||
| - | root@raspberrypi: | ||
| </ | </ | ||
