Unable to authenticate with rlm_perl

johnson elangbam elangbamjohnson at gmail.com
Wed Apr 2 15:17:24 CEST 2008


hi,
    I am trying to used the rlm_perl for authentication, I've found reading
all the perl modules, but wouldn't able to handle the username from the
client. For the testing purpose I've put this simple script in the perl
program

if ($RAD_REQUEST{'User-Name'} eq "john")
              {
                     $RAD_REPLY{'A message'} = " Accepting John";
                     return RLM_MODULE_OK;

               }
             else
              {
                     $RAD_REPLY{'A message'} = "Rececting users";
                     return RLM_MODULE_REJECT;
              }

unfortunately everytime i try to authenticate the user "john" regardless of
the password, the server rejects all the time

here is the piece of output after rejecting the users

rad_recv: Access-Request packet from host 127.0.0.1 port 32866, id=177,
length=56
        User-Name = "john"
        User-Password = "password"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 0
+- entering group authorize
++[preprocess] returns ok
perl_pool: item 0x9e63c98 asigned new request. Handled so far: 1
found interpetator at address 0x9e63c98
rlm_perl: Added pair User-Name = john
rlm_perl: Added pair User-Password = password
rlm_perl: Added pair NAS-Port = 0
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
perl_pool total/active/spare [32/0/32]
Unreserve perl at address 0x9e63c98
++[perl] returns ok
    rlm_realm: No '@' in User-Name = "john", looking up realm NULL
    rlm_realm: No such realm "NULL"
++[suffix] returns noop
  rlm_eap: No EAP-Message, not doing EAP
++[eap] returns noop
    users: Matched entry DEFAULT at line 203
++[files] returns ok
++[expiration] returns noop
++[logintime] returns noop
rlm_pap: WARNING! No "known good" password found for the user.
Authentication may fail because of this.
++[pap] returns noop
  rad_check_password:  Found Auth-Type Perl
auth: type "Perl"
+- entering group Perl
perl_pool: item 0xa08e5d8 asigned new request. Handled so far: 1
found interpetator at address 0xa08e5d8
1,bill,Cleartext-Password,bill,:=
Use of uninitialized value in string eq at
/usr/local/etc/raddb/example.pmline 126.
rlm_perl: Added pair User-Name = john
rlm_perl: Added pair User-Password = password
rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
rlm_perl: Added pair NAS-Port = 0
rlm_perl: Added pair Auth-Type = Perl
perl_pool total/active/spare [32/0/32]
Unreserve perl at address 0xa08e5d8
++[perl] returns reject
auth: Failed to validate the user.
Login incorrect: [john/password] (from client localhost port 0)
  Found Post-Auth-Type Reject
+- entering group REJECT
        expand: %{User-Name} -> john
 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 177 to 127.0.0.1 port 32866
Waking up in 4.9 seconds.
Cleaning up request 0 ID 177 with timestamp +10
Ready to process requests.


Regards,
Elangbam Johnson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20080402/a4b373b9/attachment.html>


More information about the Freeradius-Users mailing list