Can I test a perl script?
I have a perl script that obtains username and password from a pg database. I'm new at freeradius, so I only can do a radtest with a localhost user. Can I test my perl script with an user from the pg database? how y do the radtest? -- Fabricio A. Flores G. Egresado en Ingeniería en Sistemas Blog Personal <http://fabricioflores.wordpress.com/>
Hi,
I have a perl script that obtains username and password from a pg database. I'm new at freeradius, so I only can do a radtest with a localhost user. Can I test my perl script with an user from the pg database? how y do the radtest?
yes. you can either have the script as a normal perl script and launch it from the command line, or you can have the script as something that FreeRADIUS uses, call it within the authenticate section and ensure the perl module is enabled/named...you can then just use eg radtest alan
Thanks for your answer. I want to test my perl script with freeradius. In the command line it works but i want to test with radtest (or something) at freeradius. Ia there any test for it? El 26/02/2012 16:03, "Alan Buxey" <A.L.M.Buxey@lboro.ac.uk> escribió:
Hi,
I have a perl script that obtains username and password from a pg database. I'm new at freeradius, so I only can do a radtest with a localhost user. Can I test my perl script with an user from the pg database? how y do the radtest?
yes. you can either have the script as a normal perl script and launch it from the command line, or you can have the script as something that FreeRADIUS uses, call it within the authenticate section and ensure the perl module is enabled/named...you can then just use eg radtest
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
Thanks for your answer. I want to test my perl script with freeradius. In the command line it works but i want to test with radtest (or something) at freeradius. Ia there any test for it?
if you want to use radtest, then that means you are testing the FreeRADIUS server - so simply enable PERL in the FreeRADIUS server (edit the perl module config and then edit the enabled virtual servers to use the perl module wherever you need it - eg in authenticate section) alan
Ok i will try this... thanks El 26/02/2012 16:49, "Alan Buxey" <A.L.M.Buxey@lboro.ac.uk> escribió:
Hi,
Thanks for your answer. I want to test my perl script with freeradius. In the command line it works but i want to test with radtest (or something) at freeradius. Ia there any test for it?
if you want to use radtest, then that means you are testing the FreeRADIUS server - so simply enable PERL in the FreeRADIUS server (edit the perl module config and then edit the enabled virtual servers to use the perl module wherever you need it - eg in authenticate section)
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
ok I tried to configure freeRadius with perl sopport.... in the Rlm_perl doc says: In the users file comment the 'DEFAULT Auth-Type = System' lines, and then add:DEFAULT Auth-Type = Perl Fall-Through = yes but when I start the server (radiusd -X) it returns me: /etc/raddb/users[208]: Parse error (check) for entry DEFAULT: Unknown value Perl for attribute Auth-Type Errors reading /etc/raddb/users /etc/raddb/modules/files[7]: Instantiation failed for module "files" /etc/raddb/sites-enabled/inner-tunnel[111]: Failed to find module "files". /etc/raddb/sites-enabled/inner-tunnel[34]: Errors parsing authorize section. what i must do? El 26 de febrero de 2012 16:51, Fabricio Flores <fabrifloresg@gmail.com>escribió:
Ok i will try this... thanks El 26/02/2012 16:49, "Alan Buxey" <A.L.M.Buxey@lboro.ac.uk> escribió:
Hi,
Thanks for your answer. I want to test my perl script with freeradius. In the command line it works but i want to test with radtest (or something) at freeradius. Ia there any test for it?
if you want to use radtest, then that means you are testing the FreeRADIUS server - so simply enable PERL in the FreeRADIUS server (edit the perl module config and then edit the enabled virtual servers to use the perl module wherever you need it - eg in authenticate section)
alan - 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@hotmail.com Google: fabrifloresg@gmail.com Twitter: fabricioflores Skype: fabriciofloresgallardo Blog Personal <http://fabricioflores.wordpress.com/>
Hi,
ok I tried to configure freeRadius with perl sopport.... in the Rlm_perl doc says:�
ignore. dont add anything to the users file - simply call the perl module where you need it to be called - if using the default name, simply add the word 'perl' to eg your inner-tunnel authentication section alan
ok I ignored it bat when i do the request it returns me: rad_recv: Access-Request packet from host 127.0.0.1 port 48698, id=188, length=62 User-Name = "xxxxxxxx" User-Password = "xxxxxxx" NAS-IP-Address = 127.0.0.1 NAS-Port = 1645 +- entering group authorize {...} ++[preprocess] returns ok ++[chap] returns noop ++[mschap] returns noop [suffix] No '@' in User-Name = "xxxxxxxx", looking up realm NULL [suffix] No such realm "NULL" ++[suffix] returns noop [eap] No EAP-Message, not doing EAP ++[eap] returns noop ++[unix] returns notfound ++[files] returns noop GOT CLONE -1208857904 0x8411750 rlm_perl: Added pair User-Name = xxxxxxxxx rlm_perl: Added pair User-Password = xxxxxxxx rlm_perl: Added pair NAS-Port = 1645 rlm_perl: Added pair NAS-IP-Address = 127.0.0.1 ++[perl] returns ok ++[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 No authenticate method (Auth-Type) configuration found for the request: Rejecting the user Failed to authenticate the user. Using Post-Auth-Type Reject +- entering group REJECT {...} [attr_filter.access_reject] expand: %{User-Name} -> xxxxxxxxx attr_filter: Matched entry DEFAULT at line 11 ++[attr_filter.access_reject] returns updated Delaying reject of request 0 for 1 seconds Going to the next request Waking up in 0.9 seconds. Sending delayed reject for request 0 Sending Access-Reject of id 188 to 127.0.0.1 port 48698 Waking up in 4.9 seconds. Cleaning up request 0 ID 188 with timestamp +5 what is the value pair (vp) that i need to use at the perl script? i used User-Name for the user and User-Password and Cleartext-Password for the password... which is the correct vp? El 27 de febrero de 2012 14:25, Alan Buxey <A.L.M.Buxey@lboro.ac.uk>escribió:
Hi,
ok I tried to configure freeRadius with perl sopport.... in the Rlm_perl doc says:�
ignore. dont add anything to the users file - simply call the perl module where you need it to be called - if using the default name, simply add the word 'perl' to eg your inner-tunnel authentication section
alan - 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@hotmail.com Google: fabrifloresg@gmail.com Twitter: fabricioflores Skype: fabriciofloresgallardo Blog Personal <http://fabricioflores.wordpress.com/>
participants (2)
-
Alan Buxey -
Fabricio Flores