Add Users in MySQL database
Fajar A. Nugraha
list at fajar.net
Sat Mar 17 03:40:32 CET 2012
On Sat, Mar 17, 2012 at 7:55 AM, Fabricio Flores <fabrifloresg at gmail.com> wrote:
> Mmm I have a web service so I have users and password... So If somebody
> wants to login in the captive portal first i want to see in the web service
> if ther is this user, and if the user exists i add the user in the mysql
> database and freeradius athenticate thes user from the mysql database...
I'm pretty sure there was a similar thread earlier about this.
Anyway, for that purpose you do NOT want daloradius/dialupadmin/whatever.
Instead, what you need is:
- a captive portal login page, that supports dynamic processing, that
you can customize (e.g. http://net-mai.net/files/hotspotlogin.php.txt
)
- knowledge on that particular programing laguange (e.g.
http://php.net/docs.php )
- knowledge on how to create users on FR's sql table. (e.g.
http://wiki.freeradius.org/rlm_sql )
The "i want to see in the web service if ther is this user" part can
be easily done by modifying the hotspotlogin page, and "add the user
in the mysql
database" part is basically you modify the hostspotlogin page to just
create an entry in radcheck with (randomly-created) cleartext-password
attribute, and possibly another entry with Exipration attribute.
After that set the hotspotlogin to redirect to the captive portal
(e.g. chillispot) with the correct generated username and password.
Users don't even need to know what the generated password is. The
process between captive portal and radius is then just another normal
NAS <-> radius AAA process, nothing special about it.
--
Fajar
More information about the Freeradius-Users
mailing list