SQL for return attributes only?
ObDisclaimer: I have googled my best google, and read all the docs I can find, so please be gentle if this is a dumb question. Is it possible with freeradius to use SQL to retrieve certain return attributes (in this case rate limiting values for PPPOE sessions), whilst still handling authentication through PAM? In other words, I don't want to authenticate using SQL, I simply want to grab an attribute or two from a MySQL database, indexed by username, if the PAM authentication succeeds. I'm using the Winbind PAM module to authenticate against a Windows AD (a "legacy" requirement), so storing passwords in MySQL is a non-starter. -- hugh -- Hugh Messenger hugh@alaweb.com
Hugh Messenger wrote:
ObDisclaimer: I have googled my best google, and read all the docs I can find, so please be gentle if this is a dumb question.
Is it possible with freeradius to use SQL to retrieve certain return attributes (in this case rate limiting values for PPPOE sessions), whilst still handling authentication through PAM?
Yes. However, in the current code there must be *something* that matches in the radcheck or radgroupcheck table for the user/group, else the radreply/radgrouprelpy table won't be used. Maybe easiest to put this in radcheck: insert into radcheck (username,attribute,op,value) values ( 'theuser', 'Pam-Auth', ':=', 'thepamservice' ) ...then put your per-user attributes in radreply. Alternatively you could defined a local attribute in the dictionary: Attribute My-Fake-Item 3000 string ...and set that. There are probably cleaner ways to do it using SQL groups and/or the "search on not found" / default profile stuff, but I must admit to not groking that part of the 1.1 SQL code.
participants (2)
-
Hugh Messenger -
Phil Mayers