How do you pass Cleartext-Password from CHAP to another module

paul smith paulsmth37 at googlemail.com
Wed Feb 16 03:07:38 CET 2011


Hi,

I want to authenticate a CHAP request against my sql database, but
then pass the Cleartext-Password to the next module.
I've got the CHAP working fine, but can't work out how to pass the password on.
Is this possible?

I have an exec module like this:
    exec authz {
        wait = yes
        program = "authz -u %{User-Name} -p %{Cleartext-Password}"
        input_pairs = request
        output_pairs = reply
    }

Then in my authorize section I have:

authorize {
    chap
    sql
    authz
}

The chap authentication works from the debug I get:
Wed Feb 16 01:45:29 2011 : Info: Found Auth-Type = CHAP
Wed Feb 16 01:45:29 2011 : Info: +- entering group CHAP {...}
Wed Feb 16 01:45:29 2011 : Info: [chap] login attempt by "a" with CHAP password
Wed Feb 16 01:45:29 2011 : Info: [chap] Using clear text password "a"
for user a authentication.
Wed Feb 16 01:45:29 2011 : Info: [chap] chap user a authenticated succesfully
Wed Feb 16 01:45:29 2011 : Info: ++[chap] returns ok

But when it runs my other module I get:
Wed Feb 16 01:45:29 2011 : Info: [authz] 	expand: %{User-Name} -> a
Wed Feb 16 01:45:29 2011 : Info: [authz] 	expand: %{Cleartext-Password} ->

The Cleartext-Password isn't set.

Does anyone know what I need to set to make this happen?

thanks,



More information about the Freeradius-Users mailing list