Re: SQL and Huntgroups

2013-05-01 Thread Fajar A. Nugraha
On Tue, Apr 30, 2013 at 3:09 PM, gregoire.le...@retenodus.net wrote: Hello, It pretty much said that: - you need to add an entry to radgroupcheck, so that when Huntgroup-Name matches a value (site_a), an SQL group (site_a_admins) will be assigned - you add entries to radgroupreply to

Re: SQL and Huntgroups

2013-04-30 Thread gregoire . leroy
Hello, It pretty much said that: - you need to add an entry to radgroupcheck, so that when Huntgroup-Name matches a value (site_a), an SQL group (site_a_admins) will be assigned - you add entries to radgroupreply to return whatever-attribute-value-pairs-you-want for site_a_admins group. I

Re: SQL and Huntgroups

2013-04-29 Thread gregoire . leroy
For the step 4, I have to : 1) Retrieve the huntgroup 2) Compare it with what the user sends 3) If it matches, give him his specific statement. So, if I understand correctly in the authorize section, I have to maintain a radipusers table for my IP/users and do something like : 1) update request

Re: SQL and Huntgroups

2013-04-29 Thread A . L . M . Buxey
Hi, The thing I want to be added by radius in the reply : if (Huntgroup-Name == 'one_huntgroup_name') { Attribute1 op1 value1 Attribute2 op2 value2 ... Attributei opi valuei } Given that Attribute,op,value 1...i are in the MySQL table. if (Huntgroup-Name ==

Re: SQL and Huntgroups

2013-04-29 Thread gregoire . leroy
Hello, if (Huntgroup-Name == 'one_huntgroup_name') { update reply { attribute1 := %{sql:SELECT blah blah} attribute2 := %{sql:SELECT blah blah} attribute3 := %{sql:SELECT blah blah} attribute4 := %{sql:SELECT blah blah} } } The thing is, I

Re: SQL and Huntgroups

2013-04-29 Thread A . L . M . Buxey
Hi, The thing is, I don't know how many attributes I have. It could be 1, 4, 10 and not always the same. That's why I want to retrieve from the database the value, the op and the attribute. just use authorize_group_reply_query and the groupreply_table = radgroupreply part of sql.conf ?

Re: SQL and Huntgroups

2013-04-29 Thread Grégoire Leroy
for NAS, still if the user is authenticated I use radreply for X, the issue here is step 4. The how-to on the wiki about huntgroups and SQL recommends to use unlang in the authorize section. So, I update the request to assign the Huntgroup- Name attribute, and use unlang to add the Y

Re: SQL and Huntgroups

2013-04-29 Thread Fajar A. Nugraha
to the reply for NAS, still if the user is authenticated I use radreply for X, the issue here is step 4. The how-to on the wiki about huntgroups and SQL recommends to use unlang in the authorize section. So, I update the request to assign the Huntgroup- Name attribute, and use unlang to add

Re: SQL and Huntgroups

2013-04-25 Thread gregoire . leroy
Now, documentation seems to say I have to add something in my authorize{} section, but the only mention of authorize in my current configuration is : authorize { ok # respond to the Status-Server request. Autz-Type Status-Server {

Re: SQL and Huntgroups

2013-04-25 Thread Alan DeKok
gregoire.le...@retenodus.net wrote: My fault : I've open status instead of default. I have no idea what that means. All of my help is presuming that you're starting off with the default configuration. If you've butchered it, you're on your own. For the step 4, I have to : 1) Retrieve

Re: SQL and Huntgroups

2013-04-24 Thread gregoire . leroy
Hello, So... what do you want to do? You've been very clear that you want help with a particular *solution*. Because your assumptions are wrong, your solution is wrong. So I can't really help you with that. What do you have, and hat do you want? - you want the user to be

Re: SQL and Huntgroups

2013-04-24 Thread Alan DeKok
gregoire.le...@retenodus.net wrote: I want the following behaviour : 1) Set the password for the user 2) Authentication of the user 3) X is always added to the reply if the user is authenticated 4) Moreover, Y is added to the reply for NAS, still if the user is authenticated. That's

Re: SQL and Huntgroups

2013-04-23 Thread gregoire . leroy
Hello, Le 2013-04-22 15:33, Alan DeKok a écrit : gregoire.le...@retenodus.net wrote: First, I want to check is the user has the right password. If he has the right password, I want to give him a configuration and if he's in the one_huntgroup_name (i.e he's from a special NAS), I want to give

Re: SQL and Huntgroups

2013-04-23 Thread Alan DeKok
gregoire.le...@retenodus.net wrote: I have actually read the documentation, and the wiki about SQL. Really. Otherwise, I wouldn't have sent the first email. I'm going to be more specific about what I don't understand. OK. That's good. In my user files, I have two lines to check. First,

Re: SQL and Huntgroups

2013-04-22 Thread gregoire . leroy
Hello, Le 2013-04-20 15:23, Alan DeKok a écrit : gregoire.le...@retenodus.net wrote: Hello, I'm translating a flat file configuration into a MySQL configuration, but I have some difficulties with huntgroups. An example of what I have in my flat file : 21

Re: SQL and Huntgroups

2013-04-22 Thread Alan DeKok
gregoire.le...@retenodus.net wrote: First, I want to check is the user has the right password. If he has the right password, I want to give him a configuration and if he's in the one_huntgroup_name (i.e he's from a special NAS), I want to give him the Framed-IP-Address. That's the current

Re: SQL and Huntgroups

2013-04-20 Thread Alan DeKok
gregoire.le...@retenodus.net wrote: Hello, I'm translating a flat file configuration into a MySQL configuration, but I have some difficulties with huntgroups. An example of what I have in my flat file : 21 example@domain⋅⋅Cleartext-Password := password 22

SQL and Huntgroups

2013-04-19 Thread gregoire . leroy
Hello, I'm translating a flat file configuration into a MySQL configuration, but I have some difficulties with huntgroups. An example of what I have in my flat file : 21 example@domain⋅⋅Cleartext-Password := password 22 ⋅Service-Type = Framed-User, 23

SQL and huntgroups

2009-07-20 Thread Kanwar Ranbir Sandhu
Hi All, I want to use huntgroups in freeradius 2.1.6. I have a sql backend for auth and acct, so naturally I want to put huntgroups into mysql as well. I've read the wiki on how to do this, and I understand the notes. However, the wiki entry mentions that the following should either go into

Re: SQL and huntgroups

2009-07-20 Thread Ivan Kalik
I've read the wiki on how to do this, and I understand the notes. However, the wiki entry mentions that the following should either go into radiusd.conf or in sites-enabled/default: update request { Huntgroup-Name := %{sql:select groupname from radhuntgroup where