Hello What's the best approach regarding custom mysql queries? I'd like to check if a user is blocked whilst authorising.. Have tried to add something like this to my dictionary file: ATTRIBUTE User-Disabled-Attr 3002 integer And then putting a 1 / 0 in to radcheck against the user. What's the best way to do this kind of request? Is it better to write a lookup somewhere else? Thanks J -- View this message in context: http://freeradius.1045715.n5.nabble.com/Custom-MySQL-Queries-tp4943692p49436... Sent from the FreeRadius - User mailing list archive at Nabble.com.
If you would like to disable a user why not to use the Auth-Type := Reject which is natively available in freeradius. I don't think it is necessary to re-invent the wheel. Regards Suman On Thu, Oct 27, 2011 at 11:07 PM, JennyBlunt <jennyshoehorn@me.com> wrote:
Hello
What's the best approach regarding custom mysql queries? I'd like to check if a user is blocked whilst authorising..
Have tried to add something like this to my dictionary file:
ATTRIBUTE User-Disabled-Attr 3002 integer
And then putting a 1 / 0 in to radcheck against the user.
What's the best way to do this kind of request? Is it better to write a lookup somewhere else?
Thanks
J
-- View this message in context: http://freeradius.1045715.n5.nabble.com/Custom-MySQL-Queries-tp4943692p49436... Sent from the FreeRadius - User mailing list archive at Nabble.com. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I usually add Auth-Type := Reject to the radcheck table to disable a user. You remove the entry to enable the user. Tim
-----Original Message----- From: freeradius-users- bounces+tim.sylvester=networkradius.com@lists.freeradius.org [mailto:freeradius-users- bounces+tim.sylvester=networkradius.com@lists.freeradius.org] On Behalf Of JennyBlunt Sent: Thursday, October 27, 2011 10:37 AM To: freeradius-users@lists.freeradius.org Subject: Custom MySQL Queries
Hello
What's the best approach regarding custom mysql queries? I'd like to check if a user is blocked whilst authorising..
Have tried to add something like this to my dictionary file:
ATTRIBUTE User-Disabled-Attr 3002 integer
And then putting a 1 / 0 in to radcheck against the user.
What's the best way to do this kind of request? Is it better to write a lookup somewhere else?
Thanks
J
-- View this message in context: http://freeradius.1045715.n5.nabble.com/Custom-MySQL-Queries- tp4943692p4943692.html Sent from the FreeRadius - User mailing list archive at Nabble.com. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi, I hadn't realised that was available. Do I need to modify my query - have added that column to the radcheck table but can still login. J -- View this message in context: http://freeradius.1045715.n5.nabble.com/Custom-MySQL-Queries-tp4943692p49442... Sent from the FreeRadius - User mailing list archive at Nabble.com.
Sorry, my mistake - I had not added as another row in my radcheck table. Is there a decent online reference for such commands - I find myself wasting a lot of time here and looking through other forums... -- View this message in context: http://freeradius.1045715.n5.nabble.com/Custom-MySQL-Queries-tp4943692p49444... Sent from the FreeRadius - User mailing list archive at Nabble.com.
JennyBlunt <jennyshoehorn@me.com> writes:
Sorry, my mistake - I had not added as another row in my radcheck table.
Is there a decent online reference for such commands - I find myself wasting a lot of time here and looking through other forums...
The Wiki is starting to look very good. Thanks to everyone who has contributed! For e.g. your specific question: http://wiki.freeradius.org/FAQ#How+do+I+deny+access+to+a+specific+user%2C+or... There is also a whole lot of great documentation and real life examples in the default configuration files. Although there may seem to be an overwhelming number of them, I do recommend briefly looking through all of them from time to time. You will probably go "hey, that looks like a useful feature I might need one day!" at least once every time. The main problem with the documentation and configuration is that FreeRADIUS is a very powerful and flexible toolbox, being capable of doing a whole lot of things that you may not need. The flexibility and feature set implies that there is a whole lot of documentation to read. That's work. There are no shortcuts. There is of course also the issue that there is a whole lot of documentation to write... But most of that job is actually done. Which makes reading it much more work :-) And if you still find that your issue wasn't documented, then this *is* an open source project. Which means that the source code can and should be used as a reference as well. And that anyone is welcome to fix any shortcoming they find, both in source or documentation. Bjørn
Hi Bjorn You're right, it's just overwhelming when you get started - I've worked on numerous apps, platforms etc. over the years and freeradius is possibly the most challenging. Fortunately, not because it's really difficult, but as you say, because there's a lot going on. It's fantastic the people in this forum help and I can't express thankful I am :) Have a good weekend J -- View this message in context: http://freeradius.1045715.n5.nabble.com/Custom-MySQL-Queries-tp4943692p49494... Sent from the FreeRadius - User mailing list archive at Nabble.com.
participants (4)
-
Bjørn Mork -
JennyBlunt -
Suman Dash -
Tim Sylvester