different user file for virtual server
Hello, I'm configuring freeradius 2.2.5 (debian 8) I need to define two different user files for two virtual hosts - different types of users for different types of services. I have tried to follow docs and set up: modules/files: files files_netdev { usersfile = ${confdir}/users_netdev } from default and example virtual host I have created: sites-enabled/virtual_netdev: listen { type = auth port = 1822 virtual_server = virtual_netdev } server virtual_netdev { authorize { preprocess files_netdev chap mschap digest netdev expiration logintime pap } authenticate { Auth-Type PAP { pap } Auth-Type CHAP { chap } Auth-Type MS-CHAP { mschap } digest } } however the log file tells me: Thu Jan 25 13:48:54 2018 : Error: /etc/freeradius/sites-enabled/virtual_netdev[10]: Failed to find "files_netdev" in the "modules" section. Thu Jan 25 13:48:54 2018 : Error: /etc/freeradius/sites-enabled/virtual_netdev[8]: Errors parsing authorize section. Thu Jan 25 13:48:54 2018 : Error: Failed to load virtual server virtual_netdev any hint what is the mistake I did? Thank you -- Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Fighting for peace is like fucking for virginity...
On Jan 25, 2018, at 7:49 AM, Matus UHLAR - fantomas <uhlar@fantomas.sk> wrote:
I'm configuring freeradius 2.2.5 (debian 8)
I need to define two different user files for two virtual hosts - different types of users for different types of services.
Then you need two different "files" modules.
I have tried to follow docs and set up:
modules/files:
files files_netdev { usersfile = ${confdir}/users_netdev }
That's good.
from default and example virtual host I have created:
sites-enabled/virtual_netdev: ... files_netdev
That's good.
however the log file tells me:
Thu Jan 25 13:48:54 2018 : Error: /etc/freeradius/sites-enabled/virtual_netdev[10]: Failed to find "files_netdev" in the "modules" section. Thu Jan 25 13:48:54 2018 : Error: /etc/freeradius/sites-enabled/virtual_netdev[8]: Errors parsing authorize section. Thu Jan 25 13:48:54 2018 : Error: Failed to load virtual server virtual_netdev
any hint what is the mistake I did?
Run it in debug mode (radiusd -X), and see more information. Alan DeKok.
On Jan 25, 2018, at 7:49 AM, Matus UHLAR - fantomas <uhlar@fantomas.sk> wrote:
I'm configuring freeradius 2.2.5 (debian 8)
I need to define two different user files for two virtual hosts - different types of users for different types of services.
On 25.01.18 08:06, Alan DeKok wrote:
Then you need two different "files" modules.
I have tried to follow docs and set up:
modules/files:
files files_netdev { usersfile = ${confdir}/users_netdev }
That's good.
from default and example virtual host I have created:
sites-enabled/virtual_netdev: ... files_netdev
That's good.
however the log file tells me:
Thu Jan 25 13:48:54 2018 : Error: /etc/freeradius/sites-enabled/virtual_netdev[10]: Failed to find "files_netdev" in the "modules" section. Thu Jan 25 13:48:54 2018 : Error: /etc/freeradius/sites-enabled/virtual_netdev[8]: Errors parsing authorize section. Thu Jan 25 13:48:54 2018 : Error: Failed to load virtual server virtual_netdev
any hint what is the mistake I did?
Run it in debug mode (radiusd -X), and see more information.
last lines of the debug output: server virtual_netdev { # from file /etc/freeradius/sites-enabled/virtual_netdev modules { Module: Checking authenticate {...} for more modules to load Module: Checking authorize {...} for more modules to load Module: Instantiating module "files_netdev" from file /etc/freeradius/modules/files files files_netdev { usersfile = "/etc/freeradius/users_netdev" compat = "cistron" } reading pairlist file /etc/freeradius/users_netdev /etc/freeradius/sites-enabled/virtual_netdev[14]: Failed to find "netdev" in the "modules" section. /etc/freeradius/sites-enabled/virtual_netdev[8]: Errors parsing authorize section. the users_netdev is empty for now. can it be the problem? or is that something with the "compat" setting? Thank you very much -- Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. M$ Win's are shit, do not use it !
On Jan 30, 2018, at 10:55 AM, Matus UHLAR - fantomas <uhlar@fantomas.sk> wrote:
last lines of the debug output:
server virtual_netdev { # from file /etc/freeradius/sites-enabled/virtual_netdev modules { Module: Checking authenticate {...} for more modules to load Module: Checking authorize {...} for more modules to load Module: Instantiating module "files_netdev" from file /etc/freeradius/modules/files files files_netdev {
i.e. it's called "files_netdev"
usersfile = "/etc/freeradius/users_netdev" compat = "cistron"
Don't set that.
} reading pairlist file /etc/freeradius/users_netdev /etc/freeradius/sites-enabled/virtual_netdev[14]: Failed to find "netdev" in the "modules" section.
"files_netdev" != "netdev"
/etc/freeradius/sites-enabled/virtual_netdev[8]: Errors parsing authorize section.
the users_netdev is empty for now. can it be the problem?
No.
or is that something with the "compat" setting?
Don't set that. It's unnecessary and will be ignored. Alan DeKok.
On Jan 30, 2018, at 10:55 AM, Matus UHLAR - fantomas <uhlar@fantomas.sk> wrote:
last lines of the debug output:
server virtual_netdev { # from file /etc/freeradius/sites-enabled/virtual_netdev modules { Module: Checking authenticate {...} for more modules to load Module: Checking authorize {...} for more modules to load Module: Instantiating module "files_netdev" from file /etc/freeradius/modules/files files files_netdev {
On 30.01.18 11:00, Alan DeKok wrote:
i.e. it's called "files_netdev"
usersfile = "/etc/freeradius/users_netdev" compat = "cistron"
Don't set that.
I have not - I guess it's the default. I set compat to "no".
} reading pairlist file /etc/freeradius/users_netdev /etc/freeradius/sites-enabled/virtual_netdev[14]: Failed to find "netdev" in the "modules" section.
"files_netdev" != "netdev"
Aha, found the error. now it works. Thanks. -- Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. I just got lost in thought. It was unfamiliar territory.
participants (2)
-
Alan DeKok -
Matus UHLAR - fantomas