On 08/06/2010 04:41 PM, Arran Cudbard-Bell wrote:
On Aug 6, 2010, at 4:14 PM, Cory Johnson wrote:

Is there a way to have seperate "users" files per virtual server? The location 
of the users file appears to be specified in modules/files. I can only seem to load 
modules from the global radiusd.conf, so each server uses the same users file. My goal is 
to use a different users file based on the IP of the client.
You can configure multiple instances of the users file then call the different 
instances from the different virtual servers.

Just list the instance name after the module name

e.g.

files virtual_server_0 {
        # The default key attribute to use for matches.  The content
        # of this attribute is used to match the "name" of the
        # entry.
        #key = "%{Stripped-User-Name:-%{User-Name}}"

        usersfile = ${confdir}/users
        acctusersfile = ${confdir}/acct_users
        preproxy_usersfile = ${confdir}/preproxy_users

        #  If you want to use the old Cistron 'users' file
        #  with FreeRADIUS, you should change the next line
        #  to 'compat = cistron'.  You can the copy your 'users'
        #  file from Cistron.
        compat = no

}

-Arran
-CJ
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Great, this is just what I was looking for.

However I am still doing something wrong, after modifying modules/files to look like this:
...
files noc {
    ...
    usersfile = ${confdir}/users-noc
    ...
}
...
and server definition looks like:
server noc {
   authorize {
       ...
       files
       ...
   }
...
}

I get the output:
/etc/freeradius/sites-enabled/noc[153]: Failed to find module "files".
/etc/freeradius/sites-enabled/noc[63]: Errors parsing authorize section.

Also tried stating "files noc" in the authorize section. After doing this I don't even get any debug output.

Forgot to mention this before: FreeRADIUS version 2.1.8 on Ubuntu.




-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to