freeradius 1.0.1 FreeRADIUS: Users FreeRADIUS Modify FreeRADIUS users, clients, and settings.
Services
freeradius.xml
Users /pkg.php?xml=freeradius.xml Clients /pkg.php?xml=freeradiusclients.xml Settings /pkg_edit.php?xml=freeradiussettings.xml&id=0 http://www.pfsense.com/packages/config/freeradiusclients.xml http://www.pfsense.com/packages/config/freeradiussettings.xml http://www.pfsense.com/packages/config/freeradiusconfig.tgz 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 global $config; $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); mwexec("rm /usr/local/etc/rc.d/radiusd*"); $fout = fopen("/usr/local/etc/rc.d/radiusd.sh","w"); fwrite($fout,"#!/bin/sh\n\n/usr/local/sbin/radiusd -X -d /usr/local/etc/raddb &\n"); fclose($fout); $fout = fopen("/usr/local/etc/radiusd.conf.dynamic","w"); fwrite($fout, "{\nipaddr = 127.0.0.1\nport = 0\ntype = auth\n}\n\n"); fclose($fout); mwexec("chmod a+x /usr/local/etc/rc.d/radiusd.sh"); mwexec("/usr/local/etc/rc.d/radiusd.sh"); function sync_package() { conf_mount_rw(); config_lock(); global $config; $fout = fopen("/usr/local/etc/raddb/users","w"); fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n"); if($config['installedpackages']['freeradius']['config'] != "") { foreach($config['installedpackages']['freeradius']['config'] as $rowhelper) { fwrite($fout, $rowhelper['username'] . " User-Password == \"" . $rowhelper['password'] . "\"\n"); } } fclose($fout); conf_mount_ro(); config_unlock(); system("/usr/bin/killall -HUP radiusd"); } sync_package(); system("/usr/bin/killall -HUP radiusd");