PAP password

Doug Hardie bc979 at lafn.org
Wed May 13 11:33:05 CEST 2009


On 13 May 2009, at 02:10, Ivan Kalik wrote:

>>
>> On 12 May 2009, at 13:29, Doug Hardie wrote:
>>
>>> V 2.1.5.  I am having a problem with PAP not using the proper user
>>> id.  IF the user id is just a plain
>>> <user_id> then it works properly.  However, I have some realms setup
>>> that have prefixes and suffixes e.g., DUB+<user_id>@lafn.  PAP is
>>> trying to find the user_id DUB+<user_id>@lafn rather than the
>>> stripped user id <user_id> and hence it doesn't find a password for
>>> the user.  Everything works just fine if I add Auth-Type := Accept
>>> to the users file, but thats not a great way to run a railroad.
>>> Obviously I missed something.
>>>
>>> hints has:
>>>
>>> DEFAULT Prefix == "DUB+", Suffix == "@lafn", Strip-User-Name = Yes
>>>     Hint = "SlipStream"
>>>
>>>
>>> What have I missed?
>>
>> I seem to have reached a dead end with this.  Version 1.x would strip
>> both the prefix and the suffix in Stripped-User-Name and then use  
>> that
>> to find the password.  Version 2.x will strip one or the other, but
>> not both.
>
> Use this to strip prefix. Use realms module to strip suffix. suffix is
> listed in default configuration. Just add your suffixes as local  
> realms to
> proxy.conf.

I'll have to give that a try.  I am a bit concerned because I need  
hints to generate different hints based on the presence of the  
suffix.  What I ended up tonight with is the following in hints:

DEFAULT User-Name =~ "DUN[+]([^@]+)@*"
       User-Name := "%{1}",
       Hint = "NationalSS1"

DEFAULT User-Name =~ "dun[+]([^@]+)@*"
       User-Name := "%{1}",
       Hint = "NationalSS2"


and so on.  This works but might be a bit kludgy.  At least we are  
authenticating again.  Thanks for the help.




More information about the Freeradius-Users mailing list