use existing sql table for user-password
Oguzhan Kayhan
oguzhank at bilkent.edu.tr
Thu Dec 2 16:00:49 CET 2010
Hello,
I just solved it with sql trigger.
When a new user is created on other table, same user/password is inserted in
radcheck table with auth-Type and other static variables.
If password change occurs in other table, it updates radcheck table password
field too.
Thank you all for help.
On Thursday, December 02, 2010 04:52:01 pm Brian Candler wrote:
> > > 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