associating mac addresses with usernames

2011-04-10 Thread Stephen Vigus
Hi all First post to the list ;) I want to use both mac authentication and username authentication. I have both working fine separately from mysql, but I want associate certain mac addresses to certain usernames and have it authenticate with the username. I thought I could use the following to

Re: associating mac addresses with usernames

2011-04-10 Thread Alan DeKok
Stephen Vigus wrote: In mysql this query would display the username associated to the mac (eg, user1@realm1), although it seems freeradius does not like this. sigh Post the debug log. Can anyone point me in the right direction so freeradius would think its user1@realm1 authenticating when

Re: associating mac addresses with usernames

2011-04-10 Thread Stephen Vigus
Hi Alan I think I'm probably doing things wrong. I realized the query I'm using is meant to count and allow anything thats not zero... not what I'm after tho. Just to double check, any sql queries I want to use are supposed to go inside sites-available/default under authorize { ? Below are the

Re: associating mac addresses with usernames

2011-04-10 Thread Stephen Vigus
Ah, managed to get it working. Changed things to look like this: if(%{sql:SELECT radusergroup.username FROM authorized_macs LEFT JOIN radusergroup ON ( authorized_macs.username = radusergroup.username ) WHERE authorized_macs.macaddr = '%{User-Name}'}){ update control { Auth-Type :=