Perl, MySQL & auth

Fabricio Flores fabrifloresg at gmail.com
Thu Apr 19 17:48:28 CEST 2012


Hi... I worked in my perl script... i did the conection to the web service
and it works... I configure freeradius (add perl and sql) in auth section,
I made a debug with freeradius -X but I don´t know if freeradius read the
perl script before work with mysql... i have this output:
rad_recv: Access-Request packet from host 127.0.0.1 port 45894, id=120,
length=62
User-Name = "1104015936"
User-Password = "fabricio1"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
# Executing section authorize from file
/etc/freeradius/sites-enabled/default
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
++[digest] returns noop
[suffix] No '@' in User-Name = "usuario", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[files] returns noop
rlm_perl: Added pair User-Name = usuario
rlm_perl: Added pair User-Password = clave
rlm_perl: Added pair NAS-Port = 1812
rlm_perl: Added pair NAS-IP-Address = 127.0.1.1
++[perl] returns ok
[sql] expand: %{User-Name} -> 1104015936
[sql] sql_set_user escaped user --> 'usuario'
rlm_sql (sql): Reserving sql socket id: 2
[sql] expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY
id -> SELECT id, username, attribute, value, op           FROM radcheck
      WHERE username = 'usuario'           ORDER BY id
[sql] expand: SELECT groupname           FROM radusergroup           WHERE
username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
groupname           FROM radusergroup           WHERE username = 'usuario'
          ORDER BY priority
rlm_sql (sql): Released sql socket id: 2
[sql] User usuario not found
++[sql] returns notfound
++[expiration] returns noop
++[logintime] returns noop
[pap] WARNING! No "known good" password found for the user.  Authentication
may fail because of this.
++[pap] returns noop
ERROR: No authenticate method (Auth-Type) found for the request: Rejecting
the user
Failed to authenticate the user.
Using Post-Auth-Type Reject
# Executing group from file /etc/freeradius/sites-enabled/default
+- entering group REJECT {...}
[attr_filter.access_reject] expand: %{User-Name} -> usuario
 attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 1 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 1
Sending Access-Reject of id 120 to 127.0.0.1 port 45894
Waking up in 4.9 seconds.
Cleaning up request 1 ID 120 with timestamp +410
Ready to process requests.



El 9 de abril de 2012 16:49, Fajar A. Nugraha <list at fajar.net> escribió:

> On Mon, Apr 9, 2012 at 10:49 PM, Fabricio Flores <fabrifloresg at gmail.com>
> wrote:
> > is possible to use the perl and mysql in authorization section? in
>
> As I've already said, yes.
>
> --
> Fajar
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>



-- 
Fabricio A. Flores G.
Egresado en Ingeniería en Sistemas

MSN: fabri_floresg at hotmail.com
Google: fabrifloresg at gmail.com
Twitter: fabricioflores
Skype: fabriciofloresgallardo

Blog Personal <http://fabricioflores.wordpress.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120419/c221d954/attachment.html>


More information about the Freeradius-Users mailing list