SQL and Huntgroups

Alan DeKok aland at deployingradius.com
Sat Apr 20 15:23:44 CEST 2013


gregoire.leroy at retenodus.net wrote:
> Hello,
> 
> I'm translating a flat file configuration into a MySQL configuration,
> but I have some difficulties with huntgroups.
> 
> An example of what I have in my flat file :
> 
>    21 example at domain>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Cleartext-Password := "password"
>    22 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Service-Type = Framed-User,

  Well, no.  There's no need to add line numbers.  There's no need to
replace tabs with ">.......".

  You're confusing the issue.  Just copy text from the "users" file
(which is it's name) to the email message.  Email can do text.

> In SQL, I'm going to create a group "example_users", with all the common
> data (line 22 to 30), an user "example at domain" who belongs to
> "example_users".
> I'm going to create an entry in radhuntgroup, with my
> "one_huntgroup_name" and the IP of my NAS.

  Then try that out in the "users" file.  The rlm_sql documentation says
that it mirrors the functionality of the "users" file.

  So... don't change two things at once.  Create the config you want in
the "users" file as one step.  As the next step, move it to SQL.  Pretty
much verbatim.

> Now, I see one problem : how can I differenciate when a request has the
> user/pass/huntgroup and when it has only the user/pass ? I suppose that
> create 3 entries in readcheck won't work because it seems awkward.
> ( example at domain | Cleartext-Password | password | =:
>   example at domain | Huntgroup-Name | one_huntgroup_name | ==
>   example at domain | Cleartext-Password | password | =:
> )

  Well, the first and second one are identical.  So they're duplicates,
and you only need one.

  But the second one checks for something different, so it's different.

  Alan DeKok.


More information about the Freeradius-Users mailing list