Re: Problem with Rlm_Perl

2011-06-27 Thread marvin
Thanks for your help.

When i compiled for the 1rst time i don't have the require librairies but
after install it and recompile my module rlm_perl wasn't installed.

I go back to the previous version of Freeswitch (the 2.1.10) and all work
now.

Thanks Again.

--
View this message in context: 
http://freeradius.1045715.n5.nabble.com/Problem-with-Rlm-Perl-and-Digest-Attributes-Translation-tp4517972p4527813.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with Rlm_Perl

2011-06-27 Thread Fajar A. Nugraha
On Mon, Jun 27, 2011 at 4:57 PM, marvin  wrote:
> So, I use the last distrib 2.1.11 and no, i haven't this file (rlm_perl.so).
> I have tried different compilation like these :
>
> ./configure --with-static-modules=perl
> ./configure --with-rlm_perl=yes
> ./configure --with-rlm_perl

Did you read the configure output?

A simple ./configure should build rlm_perl by default, but ONLY if you
have necessary dev package installed (in Ubuntu, this is libperl-dev).
If you DON'T the dev package installed, you'll get a warning similar
to this

configure: WARNING: oracle headers not found.  Use
--with-oracle-include-dir=.
configure: WARNING: silently not building rlm_sql_oracle.
configure: WARNING: FAILURE: rlm_sql_oracle requires: oci.h.

(the above is an example from rlm_oracle. The message will be
different from rlm_perl).

Again, if you're not familiar about building process, just use
prebuilt packages. F14 & 15 have 2.1.11 (in updates-testing, I think).
Ubuntu natty has 2.1.10 (in main) or 2.1.11 (unofficial PPA)

-- 
Fajar
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with Rlm_Perl

2011-06-27 Thread marvin
So, I use the last distrib 2.1.11 and no, i haven't this file (rlm_perl.so).
I have tried different compilation like these : 

./configure --with-static-modules=perl  
./configure --with-rlm_perl=yes
./configure --with-rlm_perl

Without success, I have only :

rlm_perl-2.1.11.la
rlm_perl.a
rlm_perl.la

Thanks for your help :)



--
View this message in context: 
http://freeradius.1045715.n5.nabble.com/Problem-with-Rlm-Perl-and-Digest-Attributes-Translation-tp4517972p4527688.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with Rlm_Perl

2011-06-27 Thread Fajar A. Nugraha
On Mon, Jun 27, 2011 at 4:44 PM, marvin  wrote:
> Hi,
>
> Thanks for your answer but when i build without "Don't build with
> "--with-static-modules=perl" , I have the same error.
> /usr/local/etc/raddb/modules/perl[7]: Failed to link to module 'rlm_perl':
> rlm_perl.so: cannot open shared object file: No such file or directory

Do you have rlm_perl.so? If not, what options were passed to ./configure?

Also, what distro do you use? Often it's easier to use prebuilt packages.

-- 
Fajar
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with Rlm_Perl

2011-06-27 Thread marvin
Hi,

Thanks for your answer but when i build without "Don't build with
"--with-static-modules=perl" , I have the same error.
/usr/local/etc/raddb/modules/perl[7]: Failed to link to module 'rlm_perl':
rlm_perl.so: cannot open shared object file: No such file or directory

Marvin

--
View this message in context: 
http://freeradius.1045715.n5.nabble.com/Problem-with-Rlm-Perl-and-Digest-Attributes-Translation-tp4517972p4527654.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with Rlm_Perl

2011-06-27 Thread Alan DeKok
marvin wrote:
> I found a solution to my problem by updating the version.
> But now, when i do "radiusd -X", i have this error :
> /usr/local/etc/raddb/modules/perl[7]: Failed to link to module 'rlm_perl':
> rlm_perl.so: cannot open shared object file: No such file or directory.
> 
> I don't have the "good" directory created. I suppose is an option during
> compilation because i have these files when i did 
> ./confgure --with-static-modules=perl :
> rlm_perl-2.1.11.la
> rlm_perl.a
> rlm_perl.la
> 
> Someone has a solution for a good compilation of freeradius with rlm_perl ?

  Don't build with "--with-static-modules=perl"

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with Rlm_Perl and Digest-Attributes Translation

2011-06-23 Thread marvin
subscribe done

--
View this message in context: 
http://freeradius.1045715.n5.nabble.com/Problem-with-Rlm-Perl-and-Digest-Attributes-Translation-tp4517972p4517990.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: problem with rlm_perl

2010-11-24 Thread Alan DeKok
sameer khan wrote:
> thanks for reply. i edited the dictionary to add an attribute for
> mikrotik. i will be help if you can explain a little further.

  The default dictionaries work.

  You are having issues because you are not using the default dictionaries.

  That's how complex the explanation is.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: problem with rlm_perl

2010-11-23 Thread sameer khan

Hey 
thanks for reply. i edited the dictionary to add an attribute for mikrotik. i 
will be help if you can explain a little further.

thanks again

> Date: Tue, 23 Nov 2010 22:55:11 +0100
> From: al...@deployingradius.com
> To: freeradius-users@lists.freeradius.org
> Subject: Re: problem with rlm_perl
> 
> sameer khan wrote:
> > i m trying to authenticate with rlm_perl using chap with following perl
> > script but doesn't seem to work. i m guessing chap-password should be in
> > hex (0x) format but doesn't seem to be in. hope some one can help me out
> 
>   The CHAP-Password attribute is opaque binary data, which should be hex
> in the default dictionaries.  In the output below, it's being treated as
> a printable string.
> 
>   So who edited the dictionaries, and why?
> 
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
  -
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: problem with rlm_perl

2010-11-23 Thread Alan DeKok
sameer khan wrote:
> i m trying to authenticate with rlm_perl using chap with following perl
> script but doesn't seem to work. i m guessing chap-password should be in
> hex (0x) format but doesn't seem to be in. hope some one can help me out

  The CHAP-Password attribute is opaque binary data, which should be hex
in the default dictionaries.  In the output below, it's being treated as
a printable string.

  So who edited the dictionaries, and why?

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with rlm_perl

2010-09-07 Thread Alan DeKok
Nasser Heidari wrote:
> I've done it in test environment , problem is that same configuration is
> not working in heavy load.
> If NAS does not send MAC address , I update request with a
> .. mac , but in production environment, users who does not
> have mac address , RADIUS request updates with a wrong MAC that belongs
> to another user !
> Do you have any idea?

  No.  It looks like a threading issue, but I'm not sure why.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Problem with rlm_perl

2010-09-03 Thread Nasser Heidari
I've done it in test environment , problem is that same configuration is
not working in heavy load.
If NAS does not send MAC address , I update request with a
.. mac , but in production environment, users who does not
have mac address , RADIUS request updates with a wrong MAC that belongs
to another user !
Do you have any idea?


> -Original Message-
> From: freeradius-users-bounces+nasser=rasana@lists.freeradius.org
>
[mailto:freeradius-users-bounces+nasser=rasana@lists.freeradius.org]
On
> Behalf Of Alan DeKok
> Sent: Friday, September 03, 2010 18:20
> To: FreeRadius users mailing list
> Subject: Re: Problem with rlm_perl
> 
> Nasser Heidari wrote:
> > I wanted to capture users mac address, so I've added a perl module ,
> > and after parsing cisco-av-pair attribute , I save it to DB.
> > In normal situation everything works like a charm , but in some
cases,
> > If NAS doesn't send mac-address attribute, I expect to save a
> > .. mac address in DB , but no success.
> > There is a condition that I check if mac-address attribute exists in
> > request or not, if exist it's ok , if not it should update request
> > with a .. mac address.
> 
>   This can be done in the Perl script.  Just check if the attribute
exists in the request
> hash.
> 
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with rlm_perl

2010-09-03 Thread Alan DeKok
Nasser Heidari wrote:
> I wanted to capture users mac address, so I've added a perl module , and
> after parsing cisco-av-pair attribute , I save it to DB.
> In normal situation everything works like a charm , but in some cases,
> If NAS doesn't send mac-address attribute, I expect to save a
> .. mac address in DB , but no success.
> There is a condition that I check if mac-address attribute exists in
> request or not, if exist it's ok , if not it should update request with
> a .. mac address.

  This can be done in the Perl script.  Just check if the attribute
exists in the request hash.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with rlm_perl

2009-04-07 Thread Anatoly S. Zimin
Да, это точно баг.
У меня была такая проблема, в дебаге работает. 
А как только включаешь нормальный режим, (почти)сразу начинаются глюки.
У меня есть предположение - все дело в форках. (как это не мерзко, но у
прекрасного языка perl есть кривые реализации модулей. Которые с багами работают
при форке)
Я решил свои проблемы объединением скриптов и переписал все на более низком
уровне. Т.е. заменил IO::SOcket::Inet на просто Socket. И конечно
исключить такие полезные вещи как fork и threads. Бывает глюки
появляются в новых версиях, может стоит на несколько подверсий откатится 
попробовать? (как
крайний вариант)


> Ок, я так и сделал.
> Но дело в том что мой радиус будет авторизовывать и считать несколько 
> сервисов с разных NAS.
> И очень не плохо было бы их разнести.
> Причем если запускать radius без режима дебага, то он какое то время будет 
> работать нормально, правда только какое-то.
> ---
> Ok, I and have made.
> But the matter is that my radius will be authenticate and acccounting some 
> services with different NAS.
> And very much it would be not bad to carry them.
> And if to start radius without a debug mode it what that time will work 
> normally, the truth only any.
> 
> 
> 
> - Original Message - 
> From: "Anatoly S. Zimin" 
> To: "FreeRadius users mailing list" 
> Sent: Tuesday, April 07, 2009 3:45 PM
> Subject: Re: Problem with rlm_perl
> 
> 
> > Привет!
> >
> > На самом деле, весьма _неудобно_ искать проблемы просто по дебагу + 
> > конфиг.
> > Уж лучше описать её хоть на "ломаном" англ.
> > Это так отступление...
> >
> > А вообще, у rlm_perl весьма много глюков.
> > Например при работе с разными модулями, типа IO::Socket::.
> > Попробуйте все засунуть в один скрипт.
> >
> >
> >> Hello.
> >>
> >> Config:
> >> perl auth_perl_pppoe {
> >> module = /var/www/radius/radius_auth.pl
> >> func_accounting = accounting
> >> }
> >>
> >> perl acc_perl_pppoe {
> >> module = /var/www/radius/radius_accounting.pl
> >> func_authenticate = authenticate
> >> }
> >>
> >> -
> >> authenticate {
> >> Auth-Type PPPOE_AUTH {
> >> auth_perl_pppoe
> >> }
> >>
> >> }
> >>
> >> #
> >> #  Accounting.  Log the accounting data.
> >> #
> >> accounting {
> >> Acct-Type PPPOE_ACC {
> >> acc_perl_pppoe
> >> }
> >> detail
> >> unix
> >> radutmp
> >> }
> >>
> >>
> >> this error in radiusd -X:
> >>
> >>
> >> rad_recv: Access-Request packet from host 93.95.41.141 port 53773, id=8,
> >> length=146
> >> Service-Type = Framed-User
> >> Framed-Protocol = PPP
> >> NAS-Port = 100
> >> NAS-Port-Type = Ethernet
> >> User-Name = "pppoe_test"
> >> Calling-Station-Id = "00:13:77:60:60:CB"
> >> Called-Station-Id = "internet"
> >> NAS-Port-Id = "e2_v15"
> >> CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
> >> CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
> >> NAS-Identifier = "ntk-hsgw"
> >> NAS-IP-Address = 93.95.41.141
> >> +- entering group authorize {...}
> >> ++[preprocess] returns ok
> >> [suffix] No '@' in User-Name = "pppoe_test", looking up realm NULL
> >> [suffix] No such realm "NULL"
> >> ++[suffix] returns noop
> >> ++[mschap] returns noop
> >> ++[unix] returns notfound
> >> [files] users: Matched entry DEFAULT at line 1
> >> [files] users: Matched entry DEFAULT at line 7
> >> [files] users: Matched entry DEFAULT at line 19
> >> ++[files] returns ok
> >> ++[logintime] returns noop
> >> [pap] WARNING! No "known good" password found for the user. 
> >> Authentication
> >> may fail because of this.
> >> ++[pap] returns noop
> >> Found Auth-Type = PPPOE_AUTH
> >> +- entering group PPPOE_AUTH {...}
> >> GOT CLONE -1209066800 0x91011d8
> >> rlm_perl: Added pair NAS-Port-Type = Ethernet
> >> rlm_perl: Added pair CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
> >> rlm_perl: Added pair Huntgroup-Name = ntk_pppoe
> >> rlm

Re: Problem with rlm_perl

2009-04-07 Thread Волошин Вячеслав

Ок, я так и сделал.
Но дело в том что мой радиус будет авторизовывать и считать несколько 
сервисов с разных NAS.

И очень не плохо было бы их разнести.
Причем если запускать radius без режима дебага, то он какое то время будет 
работать нормально, правда только какое-то.

---
Ok, I and have made.
But the matter is that my radius will be authenticate and acccounting some 
services with different NAS.

And very much it would be not bad to carry them.
And if to start radius without a debug mode it what that time will work 
normally, the truth only any.




- Original Message - 
From: "Anatoly S. Zimin" 

To: "FreeRadius users mailing list" 
Sent: Tuesday, April 07, 2009 3:45 PM
Subject: Re: Problem with rlm_perl



Привет!

На самом деле, весьма _неудобно_ искать проблемы просто по дебагу + 
конфиг.

Уж лучше описать её хоть на "ломаном" англ.
Это так отступление...

А вообще, у rlm_perl весьма много глюков.
Например при работе с разными модулями, типа IO::Socket::.
Попробуйте все засунуть в один скрипт.



Hello.

Config:
perl auth_perl_pppoe {
module = /var/www/radius/radius_auth.pl
func_accounting = accounting
}

perl acc_perl_pppoe {
module = /var/www/radius/radius_accounting.pl
func_authenticate = authenticate
}

-
authenticate {
Auth-Type PPPOE_AUTH {
auth_perl_pppoe
}

}

#
#  Accounting.  Log the accounting data.
#
accounting {
Acct-Type PPPOE_ACC {
acc_perl_pppoe
}
detail
unix
radutmp
}


this error in radiusd -X:


rad_recv: Access-Request packet from host 93.95.41.141 port 53773, id=8,
length=146
Service-Type = Framed-User
Framed-Protocol = PPP
NAS-Port = 100
NAS-Port-Type = Ethernet
User-Name = "pppoe_test"
Calling-Station-Id = "00:13:77:60:60:CB"
Called-Station-Id = "internet"
NAS-Port-Id = "e2_v15"
CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
NAS-Identifier = "ntk-hsgw"
NAS-IP-Address = 93.95.41.141
+- entering group authorize {...}
++[preprocess] returns ok
[suffix] No '@' in User-Name = "pppoe_test", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
++[mschap] returns noop
++[unix] returns notfound
[files] users: Matched entry DEFAULT at line 1
[files] users: Matched entry DEFAULT at line 7
[files] users: Matched entry DEFAULT at line 19
++[files] returns ok
++[logintime] returns noop
[pap] WARNING! No "known good" password found for the user. 
Authentication

may fail because of this.
++[pap] returns noop
Found Auth-Type = PPPOE_AUTH
+- entering group PPPOE_AUTH {...}
GOT CLONE -1209066800 0x91011d8
rlm_perl: Added pair NAS-Port-Type = Ethernet
rlm_perl: Added pair CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
rlm_perl: Added pair Huntgroup-Name = ntk_pppoe
rlm_perl: Added pair Service-Type = Framed-User
rlm_perl: Added pair Called-Station-Id = internet
rlm_perl: Added pair Calling-Station-Id = 00:13:77:60:60:CB
rlm_perl: Added pair Framed-Protocol = PPP
rlm_perl: Added pair User-Name = pppoe_test
rlm_perl: Added pair CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
rlm_perl: Added pair NAS-Identifier = ntk-hsgw
rlm_perl: Added pair NAS-IP-Address = 93.95.41.141
rlm_perl: Added pair NAS-Port = 100
rlm_perl: Added pair NAS-Port-Id = e2_v15
rlm_perl: Added pair Framed-Protocol = PPP
rlm_perl: Added pair Service-Type = Framed-User
rlm_perl: Added pair Class = dialup
rlm_perl: Added pair Mikrotik-Rate-Limit = 256k
rlm_perl: Added pair Framed-Compression = Van-Jacobson-TCP-IP
rlm_perl: Added pair Auth-Type = PPPOE_AUTH
++[auth_perl_pppoe] returns ok
Login OK: [pppoe_test] (from client ntk-hsgw port 100 cli 
00:13:77:60:60:CB)

+- entering group post-auth {...}
++[exec] returns noop
Sending Access-Accept of id 8 to 93.95.41.141 port 53773
Framed-Protocol = PPP
Service-Type = Framed-User
Class = 0x6469616c7570
Mikrotik-Rate-Limit = "256k"
Framed-Compression = Van-Jacobson-TCP-IP
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Accounting-Request packet from host 93.95.41.141 port 57551, 
id=9,

length=157
Service-Type = Framed-User
Framed-Protocol = PPP
NAS-Port = 100
NAS-Port-Type = Ethernet
User-Name = "pppoe_test"
Calling-Station-Id = "00:13:77:60:60:CB"
Called-Station-Id = "internet"
NAS-Port-Id = "e2_v15"
Class = 0x6469616c7570
Acct-Session-Id = "8170005c"
Framed-IP-Address = 93.95.42.63
Acct-Authentic = RADIUS
Event-Timestamp = "Apr  7 2009 17:07:22 

Re: Problem with rlm_perl

2009-04-07 Thread Anatoly S. Zimin
Привет!

На самом деле, весьма _неудобно_ искать проблемы просто по дебагу + конфиг. 
Уж лучше описать её хоть на "ломаном" англ.
Это так отступление... 

А вообще, у rlm_perl весьма много глюков. 
Например при работе с разными модулями, типа IO::Socket::.
Попробуйте все засунуть в один скрипт.
 

> Hello.
> 
> Config:
> perl auth_perl_pppoe {
> module = /var/www/radius/radius_auth.pl
> func_accounting = accounting
> }
> 
> perl acc_perl_pppoe {
> module = /var/www/radius/radius_accounting.pl
> func_authenticate = authenticate
> }
> 
> -
> authenticate {
> Auth-Type PPPOE_AUTH {
> auth_perl_pppoe
> }
> 
> }
> 
> #
> #  Accounting.  Log the accounting data.
> #
> accounting {
> Acct-Type PPPOE_ACC {
> acc_perl_pppoe
> }
> detail
> unix
> radutmp
> }
> 
> 
> this error in radiusd -X:
> 
> 
> rad_recv: Access-Request packet from host 93.95.41.141 port 53773, id=8,
> length=146
> Service-Type = Framed-User
> Framed-Protocol = PPP
> NAS-Port = 100
> NAS-Port-Type = Ethernet
> User-Name = "pppoe_test"
> Calling-Station-Id = "00:13:77:60:60:CB"
> Called-Station-Id = "internet"
> NAS-Port-Id = "e2_v15"
> CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
> CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
> NAS-Identifier = "ntk-hsgw"
> NAS-IP-Address = 93.95.41.141
> +- entering group authorize {...}
> ++[preprocess] returns ok
> [suffix] No '@' in User-Name = "pppoe_test", looking up realm NULL
> [suffix] No such realm "NULL"
> ++[suffix] returns noop
> ++[mschap] returns noop
> ++[unix] returns notfound
> [files] users: Matched entry DEFAULT at line 1
> [files] users: Matched entry DEFAULT at line 7
> [files] users: Matched entry DEFAULT at line 19
> ++[files] returns ok
> ++[logintime] returns noop
> [pap] WARNING! No "known good" password found for the user.  Authentication
> may fail because of this.
> ++[pap] returns noop
> Found Auth-Type = PPPOE_AUTH
> +- entering group PPPOE_AUTH {...}
> GOT CLONE -1209066800 0x91011d8
> rlm_perl: Added pair NAS-Port-Type = Ethernet
> rlm_perl: Added pair CHAP-Password = 0x013e0573332525cd3ebc797dbe68f0969d
> rlm_perl: Added pair Huntgroup-Name = ntk_pppoe
> rlm_perl: Added pair Service-Type = Framed-User
> rlm_perl: Added pair Called-Station-Id = internet
> rlm_perl: Added pair Calling-Station-Id = 00:13:77:60:60:CB
> rlm_perl: Added pair Framed-Protocol = PPP
> rlm_perl: Added pair User-Name = pppoe_test
> rlm_perl: Added pair CHAP-Challenge = 0x3b30fc1959ca610275bdc66582b579cf
> rlm_perl: Added pair NAS-Identifier = ntk-hsgw
> rlm_perl: Added pair NAS-IP-Address = 93.95.41.141
> rlm_perl: Added pair NAS-Port = 100
> rlm_perl: Added pair NAS-Port-Id = e2_v15
> rlm_perl: Added pair Framed-Protocol = PPP
> rlm_perl: Added pair Service-Type = Framed-User
> rlm_perl: Added pair Class = dialup
> rlm_perl: Added pair Mikrotik-Rate-Limit = 256k
> rlm_perl: Added pair Framed-Compression = Van-Jacobson-TCP-IP
> rlm_perl: Added pair Auth-Type = PPPOE_AUTH
> ++[auth_perl_pppoe] returns ok
> Login OK: [pppoe_test] (from client ntk-hsgw port 100 cli 00:13:77:60:60:CB)
> +- entering group post-auth {...}
> ++[exec] returns noop
> Sending Access-Accept of id 8 to 93.95.41.141 port 53773
> Framed-Protocol = PPP
> Service-Type = Framed-User
> Class = 0x6469616c7570
> Mikrotik-Rate-Limit = "256k"
> Framed-Compression = Van-Jacobson-TCP-IP
> Finished request 0.
> Going to the next request
> Waking up in 4.9 seconds.
> rad_recv: Accounting-Request packet from host 93.95.41.141 port 57551, id=9,
> length=157
> Service-Type = Framed-User
> Framed-Protocol = PPP
> NAS-Port = 100
> NAS-Port-Type = Ethernet
> User-Name = "pppoe_test"
> Calling-Station-Id = "00:13:77:60:60:CB"
> Called-Station-Id = "internet"
> NAS-Port-Id = "e2_v15"
> Class = 0x6469616c7570
> Acct-Session-Id = "8170005c"
> Framed-IP-Address = 93.95.42.63
> Acct-Authentic = RADIUS
> Event-Timestamp = "Apr  7 2009 17:07:22 MSD"
> Acct-Status-Type = Start
> NAS-Identifier = "ntk-hsgw"
> NAS-IP-Address = 93.95.41.141
> Acct-Delay-Time = 0
> +- entering group preacct {...}
> ++[preprocess] returns ok
> [acct_unique] Hashing 'NAS-Port = 100,Client-IP-Address =
> 93.95.41.141,NAS-IP-Address = 93.95.41.141,Acct-Session-Id =
> "8170005c",User-Name = "pppoe_test"'
> [acct_unique] Acct-Unique-Session-ID = "de65ab6044a69020".
> ++[acct_unique] returns ok
> [files] acct_users: Matched entry DEFAULT at line 29
> ++[files] returns ok
>   Found Acct-Type PPPOE_ACC
> +- entering group PPPOE_ACC {...}
> rlm_perl: perl_embed:: module = /var/www/radius/radius_accounting.pl , func
> = accounting exit status= Undefin

Re: Problem with rlm_perl

2006-07-12 Thread Boian Jordanov
Hi 
please use mailing list instead of writing to me directly.

Regarding the trouble try reinstalling the Data::Dumper module and check that 
it is linked with correct perl library.
 
On Wednesday 12 July 2006 03:09, you wrote:
> Hello!
>
> I have a problem with rlm_perl.
>
> My Linux box is Debian Sarge (perl 5.8.4-8sarge4 from Debian packages),
> with FreeRADIUS 1.1.2 compiled from source (using debian/rules).
>
> Debug output from freeradius is:
>
> Wed Jul 12 02:07:28 2006 : Debug: Module: Loaded perl
> Wed Jul 12 02:07:28 2006 : Debug:  perl: module = "/root/bin/alfatelkom.pm"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_authorize = "authorize"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_authenticate = "authenticate"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_accounting = "accounting"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_preacct = "preacct"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_checksimul = "checksimul"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_detach = "detach"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_xlat = "xlat"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_pre_proxy = "pre_proxy"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_post_proxy = "post_proxy"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_post_auth = "post_auth"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: perl_flags = "(null)"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_start_accounting = "(null)"
> Wed Jul 12 02:07:28 2006 : Debug:  perl: func_stop_accounting = "(null)"
> Can't load '/usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so' for module
> Data::Dumper: /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so: undefined
> symbol: Perl_sv_cmp at /usr/lib/perl/5.8/XSLoader.pm line 68. at
> /usr/lib/perl/5.8/Data/Dumper.pm line 27
> Compilation failed in require at /root/bin/alfatelkom.pm line 30.
> BEGIN failed--compilation aborted at /root/bin/alfatelkom.pm line 30.
> Wed Jul 12 02:07:28 2006 : Error: rlm_perl: perl_parse failed:
> /root/bin/alfatelkom.pm not found or has syntax errors. Wed Jul 12 02:07:28
> 2006 : Error: radiusd.conf[540]: perl: Module instantiation failed. Wed Jul
> 12 02:07:28 2006 : Error: radiusd.conf[1747] Unknown module "perl". Wed Jul
> 12 02:07:28 2006 : Error: radiusd.conf[1746] Failed to parse authenticate
> section.
>
> Thanks in advance,
>Ivan Rako
>University Computing Centre, Zagreb

-- 
Best Regards,
Boian Jordanov
SNE
Orbitel - Next Generation Telecom
tel. +359 2 4004 723
tel. +359 2 4004 002
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with rlm_perl.

2006-03-08 Thread Boian Jordanov
On Monday 06 March 2006 15:24, Nikos Diamantis wrote:
> [EMAIL PROTECTED] wrote:
>
> It is:
>
> <*quote*>
> use Data::Dumper;
> 
>
> in "example.pl" that causes the trouble.
>
It seems you don't have a Data::Dumper module. Running your script with "perl 
example.pl" can show this. 

> Quote from:
>
>
> http://www.perl.com/doc/manual/html/pod/perlembed.html#Compiling_your_C_pro
>gram
>
> <*quote*>
> Also, every C program that uses Perl must link in the perl library.
> What's that, you ask? Perl is itself written in C; the perl library is
> the collection of compiled C programs that were used to create your perl
> executable ( /usr/bin/perl or equivalent). (Corollary: you can't use
> Perl from your C program unless Perl has been compiled on your machine,
> or installed properly--that's why you shouldn't blithely copy Perl
> executables from machine to machine without also copying the lib
> directory.) 
>
> So if you include:
>
> -lperl
>
You don't need that. This is done automatically.

> while compiling radiusd then you get what is needed to dynamically load
> perl modules. I don't know if this is the right way, but, at least, it
> works for me.
>

This is completly wrong.
Read the "Using Perl modules, which themselves use C libraries, from your C 
program" subsection in perlemebed manual page to understand how this is done.

> I wonder if this library inclusion could be automated at the configure
> stage...
>
> > Where may be the error? If the errors are in the perl module
> > "example.pl", how do I see the extended output?

Use command like that perl /path_to_your_program/program.pl it is enough to 
see if there is some module missing etc.
Also perl -c is good to check syntax.

>
> An answer to this question would interest me, too!
> If this is not possible, then which is the simpliest aproach to
> simulating a "radius wrapper environment" to debug a perl script?

-- 
Best Regards,
Boian Jordanov
SNE
Orbitel - Next Generation Telecom
tel. +359 2 4004 723
tel. +359 2 4004 002
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with rlm_perl.

2006-03-06 Thread Yevgeny
> It is:
>
> <*quote*>
> use Data::Dumper;
> 
>
> in "example.pl" that causes the trouble.

Many thanks. I commented this string out and freeradius is running.

> I wonder if this library inclusion could be automated at the configure
> stage...

In my case, it happened automatically by itself.

> An answer to this question would interest me, too!
> If this is not possible, then which is the simpliest aproach to
> simulating a "radius wrapper environment" to debug a perl script?

If anyone here has something to say about this issue, please share.

--
Best regards.

Yevgeny


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Problem with rlm_perl.

2006-03-06 Thread Nikos Diamantis

[EMAIL PROTECTED] wrote:

rlm_perl: perl_parse failed: /etc/freeradius/example.pl not found or has
syntax errors.
radiusd.conf[211]: test_module: Module instantiation failed.
radiusd.conf[245] Unknown module "test_module".
radiusd.conf[242] Failed to parse accounting section.

The file exists:
# ls -l /etc/freeradius/example.pl
-rw-r-  1 root freerad 4620 Jan 24 14:26 /etc/freeradius/example.pl

Perl says that syntax is OK:
# perl -c /etc/freeradius/example.pl
/etc/freeradius/example.pl syntax OK
  


It is:

<*quote*>
   use Data::Dumper;


in "example.pl" that causes the trouble.

Quote from:

   
http://www.perl.com/doc/manual/html/pod/perlembed.html#Compiling_your_C_program


<*quote*>
Also, every C program that uses Perl must link in the perl library. 
What's that, you ask? Perl is itself written in C; the perl library is 
the collection of compiled C programs that were used to create your perl 
executable ( /usr/bin/perl or equivalent). (Corollary: you can't use 
Perl from your C program unless Perl has been compiled on your machine, 
or installed properly--that's why you shouldn't blithely copy Perl 
executables from machine to machine without also copying the lib directory.)



So if you include:

   -lperl

while compiling radiusd then you get what is needed to dynamically load 
perl modules. I don't know if this is the right way, but, at least, it 
works for me.


I wonder if this library inclusion could be automated at the configure 
stage...



Where may be the error? If the errors are in the perl module "example.pl",
how do I see the extended output?
  


An answer to this question would interest me, too!
If this is not possible, then which is the simpliest aproach to 
simulating a "radius wrapper environment" to debug a perl script?


--
Nikolaos A. Diamantis
/v / /<<-\.
<| / <-\ /v| <-\ /v 7 /-/ >

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html