| |
| en:dpi:dpi_components:freeradius:debug [2026/03/13 07:37] – created elena.krasnobryzh | en:dpi:dpi_components:freeradius:debug [2026/03/13 07:38] (current) – elena.krasnobryzh |
|---|
| |
| =====Enabling debug mode===== | =====Enabling debug mode===== |
| - Enable the FreeRADIUS control-socket: | - Enable the FreeRADIUS control-socket: <code>ln -s /etc/raddb/sites-available/control-socket /etc/raddb/sites-enabled/</code> This module allows the RAdmin administration tool to work. |
| <code>ln -s /etc/raddb/sites-available/control-socket /etc/raddb/sites-enabled/</code> | - Configure RAdmin write permissions in ''/etc/raddb/sites-available/control-socket'': <code>mode = rw</code> Possible values: |
| This module allows the RAdmin administration tool to work. | |
| - Configure RAdmin write permissions in ''/etc/raddb/sites-available/control-socket'': | |
| <code>mode = rw</code> | |
| Possible values: | |
| * ro = read-only access (default) | * ro = read-only access (default) |
| * rw = read and write access | * rw = read and write access |
| - Verify that the module is added to the main config: | - Verify that the module is added to the main config: <code>ls -la /etc/raddb/sites-enabled/</code> |
| <code>ls -la /etc/raddb/sites-enabled/</code> | - Restart radiusd: <code>systemctl restart radiusd</code> |
| - Restart radiusd: | |
| <code>systemctl restart radiusd</code> | |
| |
| <note important> | <note important> |
| |
| =====Working with RAdmin===== | =====Working with RAdmin===== |
| - Open RAdmin: | - Open RAdmin: <code>radmin</code> |
| <code>radmin</code> | |
| - Logging is written to the directory defined in ''/etc/raddb/radiusd.conf'', by default it is ''radius.log'' | - Logging is written to the directory defined in ''/etc/raddb/radiusd.conf'', by default it is ''radius.log'' |
| - Enable debug mode | - Enable debug mode <code>debug level 4</code> The logging verbosity can be set from 0 (disable logging) to 4 (debug mode, similar to ''radiusd -X'').\\ :!: **Important! Even with logging level 1, debug mode generates a large number of logs, so it is not recommended to keep logging enabled for a long time to avoid filling system storage.** |
| <code>debug level 4</code> | - Select a file for writing logs: <code>debug file [filename]</code> :!: **Commands must be entered sequentially; they cannot be used simultaneously as in: ''debug level 3 debug file [filename]''** |
| The logging verbosity can be set from 0 (disable logging) to 4 (debug mode, similar to ''radiusd -X'').\\ | - If an error occurs after restarting ''radiusd'' or when attempting to connect to RAdmin — check whether the socket ''/var/run/radiusd/radiusd.sock'' exists and what permissions are assigned to it.\\ If there are no access permissions (default is radiusd) — change the ''gid'' and ''uid'' parameters to "''root''" in ''/etc/raddb/sites-available/control-socket''. |
| :!: **Important! Even with logging level 1, debug mode generates a large number of logs, so it is not recommended to keep logging enabled for a long time to avoid filling system storage.** | |
| - Select a file for writing logs: | |
| <code>debug file [filename]</code>\\ | |
| :!: **Commands must be entered sequentially; they cannot be used simultaneously as in: ''debug level 3 debug file [filename]''** | |
| - If an error occurs after restarting ''radiusd'' or when attempting to connect to RAdmin — check whether the socket ''/var/run/radiusd/radiusd.sock'' exists and what permissions are assigned to it.\\ | |
| If there are no access permissions (default is radiusd) — change the ''gid'' and ''uid'' parameters to "''root''" in ''/etc/raddb/sites-available/control-socket''. | |
| * ''uid'' — the user name allowed to connect to the control socket. | * ''uid'' — the user name allowed to connect to the control socket. |
| * ''gid'' — the group name allowed to connect to the control socket. | * ''gid'' — the group name allowed to connect to the control socket. |