hi,<br> 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<br>
<br>if ($RAD_REQUEST{'User-Name'} eq "john")<br> {<br> $RAD_REPLY{'A message'} = " Accepting John";<br> return RLM_MODULE_OK;<br> <br>
}<br> else<br> {<br> $RAD_REPLY{'A message'} = "Rececting users";<br> return RLM_MODULE_REJECT;<br> }<br><br>unfortunately everytime i try to authenticate the user "john" regardless of the password, the server rejects all the time<br>
<br>here is the piece of output after rejecting the users<br><br>rad_recv: Access-Request packet from host <a href="http://127.0.0.1">127.0.0.1</a> port 32866, id=177, length=56<br> User-Name = "john"<br>
User-Password = "password"<br> NAS-IP-Address = <a href="http://127.0.0.1">127.0.0.1</a><br> NAS-Port = 0<br>+- entering group authorize<br>++[preprocess] returns ok<br>perl_pool: item 0x9e63c98 asigned new request. Handled so far: 1<br>
found interpetator at address 0x9e63c98<br>rlm_perl: Added pair User-Name = john<br>rlm_perl: Added pair User-Password = password<br>rlm_perl: Added pair NAS-Port = 0<br>rlm_perl: Added pair NAS-IP-Address = <a href="http://127.0.0.1">127.0.0.1</a><br>
perl_pool total/active/spare [32/0/32]<br>Unreserve perl at address 0x9e63c98<br>++[perl] returns ok<br> rlm_realm: No '@' in User-Name = "john", looking up realm NULL<br> rlm_realm: No such realm "NULL"<br>
++[suffix] returns noop<br> rlm_eap: No EAP-Message, not doing EAP<br>++[eap] returns noop<br> users: Matched entry DEFAULT at line 203<br>++[files] returns ok<br>++[expiration] returns noop<br>++[logintime] returns noop<br>
rlm_pap: WARNING! No "known good" password found for the user. Authentication may fail because of this.<br>++[pap] returns noop<br> rad_check_password: Found Auth-Type Perl<br>auth: type "Perl"<br>+- entering group Perl<br>
perl_pool: item 0xa08e5d8 asigned new request. Handled so far: 1<br>found interpetator at address 0xa08e5d8<br>1,bill,Cleartext-Password,bill,:=<br>Use of uninitialized value in string eq at /usr/local/etc/raddb/<a href="http://example.pm">example.pm</a> line 126.<br>
rlm_perl: Added pair User-Name = john<br>rlm_perl: Added pair User-Password = password<br>rlm_perl: Added pair NAS-IP-Address = <a href="http://127.0.0.1">127.0.0.1</a><br>rlm_perl: Added pair NAS-Port = 0<br>rlm_perl: Added pair Auth-Type = Perl<br>
perl_pool total/active/spare [32/0/32]<br>Unreserve perl at address 0xa08e5d8<br>++[perl] returns reject<br>auth: Failed to validate the user.<br>Login incorrect: [john/password] (from client localhost port 0)<br> Found Post-Auth-Type Reject<br>
+- entering group REJECT<br> expand: %{User-Name} -> john<br> attr_filter: Matched entry DEFAULT at line 11<br>++[attr_filter.access_reject] returns updated<br>Delaying reject of request 0 for 1 seconds<br>Going to the next request<br>
Waking up in 0.9 seconds.<br>Sending delayed reject for request 0<br>Sending Access-Reject of id 177 to <a href="http://127.0.0.1">127.0.0.1</a> port 32866<br>Waking up in 4.9 seconds.<br>Cleaning up request 0 ID 177 with timestamp +10<br>
Ready to process requests.<br><br><br>Regards,<br>Elangbam Johnson<br><br>