Using FreeRADIUS with SQL backend and advanced configuration

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Dec 10 01:58:06 CET 2015


> On 9 Dec 2015, at 19:47, A.L.M.Buxey at lboro.ac.uk wrote:
> 
> Hi,
> 
>> Could you possibly provide a more elaborate example than that? How do I
>> differentiate between the different groups of requests? As the tables
>> look like this:
> 
> http://wiki.freeradius.org/guide/SQL%20HOWTO
> 
> 
> look at usergroup - that assigns a username to a group...the groupreply can then be used....
> as just one example....
> 
> personally I wouldnt use most of the default bits because unlang is much better
> for defining policy.....so you could use unlang to pull a group out of a DB
> and then use unlang to pull out VLAN assignments based on eg username/MAC address
> from another table and use those values...the power of %{sql:.....}

Or if you want to jump on the v3.1.x bandwagon, as a number of people are doing (maybe the message about CIT, and releases not being magical is finally getting through ;) ), you can use the mapping syntax:

	map sql "SELECT * FROM `my_table` WHERE user = '%{User-Name}'" {
		&Tunnel-Private-Group-ID := 'vlan'	# Map column vlan to Tunnel-Private-Group-ID
		&Service-Type := 'service_level'	# Map column service_level to service-type attribute
	}



Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20151209/02b4bc7d/attachment.sig>


More information about the Freeradius-Users mailing list