use existing sql table for user-password

Brian Candler B.Candler at pobox.com
Thu Dec 2 15:52:01 CET 2010


> > But for radcheck, i need to add attribute and value fields as i see.
> > How can i check just username and password from one table, and check other 
> > attributes (AuthType etc) from another??
> 
>   Write an SQL function.

Or use the group functionality. That is, use

  authorize_check_query
  authorize_reply_query

to get the password, and

  group_membership_query
  authorize_group_check_query
  authorize_group_reply_query

to get the attributes from another table. In group_membership_query you map
the username to some other key, but you can just map it to the username
again if you wish.

But if this is MySQL, as Alan says it may be easier (and is certainly more
flexible) to put your logic into stored procedures. Then use

  authorize_check_query = "call getCheck('%{User-Name}');"
  authorize_reply_query = "call getReply('%{User-Name}');"

Regards,

Brian.



More information about the Freeradius-Users mailing list