Perl, MySQL & auth

Fajar A. Nugraha list at fajar.net
Mon Apr 9 17:42:49 CEST 2012


On Mon, Apr 9, 2012 at 10:17 PM, Fabricio Flores <fabrifloresg at gmail.com> wrote:
> Hi everyone.. I have a little problem... I have users with a web service but
> I need to store the accounting in a mysql database because I use daloradius.
> So I have an authentication with SQL module but I need to add users before
> authorization. So I think if is possible to use the perl module in the
> authorization section to add users to MySQL database and after freeradius do
> an authorization with the mysql database.

If you're using a captive portal setup, then usually the captive
portal web page will take care of adding users. No need to get perl or
freeradius involved at that point. FR simply uses whatever is on the
db.

If, on the other hand, you have a setup that's like "I'll accept
whatever username and password that the client sends, and add them to
the db", then it should be possibe, as long as the client ONLY uses
pap (or probably PEAP-GTC and TTLS-PAP as well). You can easily have
multiple modules in authorize section, or even do unlang with "%{sql:
INSERT INTO radcheck ....}". Pardon me if I say such setup is stupid
though. The only time it might be useful is if you're taking over
someone else's radius, with no access to existing user/password, and
simply want to accept whatever the user sends just to keep the service
going.

-- 
Fajar


More information about the Freeradius-Users mailing list