From 9162e491626b88f1be22eb44bbfa3df0fd439de8 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 17 Feb 2005 15:18:47 +0000 Subject: Add Colins FreeRADIUS package --- packages/freeradius.xml | 66 +++++++++++++++++++++++++++++++++++++++ packages/freeradiusclients.xml | 71 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 packages/freeradius.xml create mode 100644 packages/freeradiusclients.xml (limited to 'packages') diff --git a/packages/freeradius.xml b/packages/freeradius.xml new file mode 100644 index 00000000..68d6eb38 --- /dev/null +++ b/packages/freeradius.xml @@ -0,0 +1,66 @@ + + freeradius + + RADIUS Users + Add, edit, and delete RADIUS users. +
Services
+ freeradius.xml +
+ + RADIUS Clients + Add, edit, and delete RADIUS clients. +
Services
+ freeradiusclients.xml +
+ + http://www.pfsense.com/packages/config/freeradiusclients.xml + + installedpackages->package->$packagename->configuration->settings + + + Username + username + + + Description + description + + + + + Username + username + Enter the username here + input + + + Password + password + Enter the password here + password + + + Username Description + description + Enter the description of the user here + input + + + + function sync_package() + { + global $config; + $fout = fopen("/usr/local/etc/raddb/users","w"); + if($config['installedpackages']['freeradius']['config'] != "") { + foreach($config['installedpackages']['freeradius']['config'] as $rowhelper) { + fwrite($fout, $rowhelper['username'] . " User-Password == \"" . $rowhelper['password'] . "\"\n"); + } + } + fclose($fout); + } + sync_package(); + + + sync_package(); + +
\ No newline at end of file diff --git a/packages/freeradiusclients.xml b/packages/freeradiusclients.xml new file mode 100644 index 00000000..61fbe5bc --- /dev/null +++ b/packages/freeradiusclients.xml @@ -0,0 +1,71 @@ + + freeradiusclients + + RADIUS Clients + Add, edit, and delete RADIUS clients. +
Services
+ freeradiusclients.xml +
+ installedpackages->package->$packagename->configuration->settings + + + Client + client + + + Shortname + shortname + + + Description + description + + + + + Client + client + Enter the client's IP address here + input + + + Shortname + shortname + Enter the client's shortname here + input + + Shared Secret + sharedsecret + Enter the client's shared secret here + password + + Description + description + Enter the description of the user here + input + + + + global $config; + system("rm /usr/local/etc/raddb/clients*"); + $fout = fopen("/usr/local/etc/raddb/clients.conf","w"); + fwrite($fout, "client 127.0.0.1 {\n secret = pfsense\n shortname = localhost\n}\n\n"); + fclose($fout); + + + function sync_package() { + global $config; + $fout = fopen("/usr/local/etc/raddb/clients.conf","w"); + if($config['installedpackages']['freeradius']['config'] != "") { + foreach($config['installedpackages']['freeradius']['config'] as $rowhelper) { + fwrite($fout, "client " . $rowhelper['client'] . "{\n" . "secret = " . $rowhelper['sharedsecret'] . "\nshortname = " . $rowhelper['shortname'] . "\n}\n\n"); + } + } + fclose($fout); + } + sync_package(); + + + sync_package(); + +
\ No newline at end of file -- cgit v1.2.3