|
I use freeradius on rh8. I have all customer
info in a mysql db with a web front end. The script below runs from a cron
job every 15 minutes and writes a radius users file then reloads radius
daemon. I don't have tens of thousands of users so the radius text
file works for me and is easy scp to a backup radius server in the same
cron job.
The script below creates two entries, one formatted
for smart bridges and the other for mikrotik wireless auth (not hotspot).
Thought this might spark some creative thinking
from the list users regarding auth methods.
[EMAIL PROTECTED] macaddress]# cat
dbToRad
#!/usr/bin/php -q <?php
define('MYSQL_HOST',
'localhost');
define('MYSQL_USER', 'yourdbuser'); define('MYSQL_PASS', 'yourdbpass'); define('MYSQL_DB', 'custmain'); $fp=fopen("/usr/local/etc/raddb/users","w");
mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS); mysql_select_db(MYSQL_DB); $result = mysql_query('SELECT * from
sub');
while ($row =
mysql_fetch_array($result))
{ fputs($fp,"#".$row['lastname']."-".$row['firstname']."-".$row['company']."\r\n"); $str = strtolower($row['macaddress']); list($mac1, $mac2, $mac3, $mac4, $mac5, $mac6) = split (":", $str, 6); $macmikro = $mac1.":".$mac2.":".$mac3.":".$mac4.":".$mac5.":".$mac6."\tpassword == \"\"\r\n"; $macsmart = $mac1.$mac2.$mac3.$mac4.$mac5.$mac6."\tpassword==\"".$mac1.$mac2.$mac3.$mac4.$mac5.$mac6."\"\r\n"; fputs($fp,$macmikro); fputs($fp,$macsmart); } fclose($fp); ?>
|
- [smartBridges] APPO internal Mac authentication Blazen Wireless
- RE: [smartBridges] APPO internal Mac authenticat... sB Tech Support
- Re: [smartBridges] APPO internal Mac authent... Blazen Wireless
- Re: [smartBridges] APPO internal Mac aut... Mike Davis
- Re: [smartBridges] APPO internal Mac... Scott Brooks
- RE: [smartBridges] APPO interna... Mike Davis
- Re: [smartBridges] APPO int... Eje Gustafsson
- Re[2]: [smartBridges] APPO internal ... Eje Gustafsson
- Re: Re[2]: [smartBridges] APPO ... Kevin Sullivan
- RE: [smartBridges] APPO internal Mac authenticat... The Wirefree Network
- Re: [smartBridges] APPO internal Mac authenticat... Sevak Avakians
- RE: [smartBridges] APPO internal Mac authent... Kevin Proctor
- RE: [smartBridges] APPO internal Mac aut... Scott Damron
