0

I have a new install of Freeradius 3.0.16 on Ubuntu 18.04

The sqlcounter is not working because Freeradius is trying to load sqlcounter before the sql module. The docs says that in that case you need to add the modules in the instantiate of radiusd.conf

When I add the modules in the instatiate part of radiusd.conf I get an error "module not found" I tried to add only the name, but also the full path.

Without de sqlcounter module, the sql module works fine.

How do I add these two sql module to the instantiate part of radiusd.conf?

instantiate {
sql
sqlcounter
}

Edit: I have a symbolic link from mods-enabled to mods-available for sql and sqlcounter

In the instantiate section of radiusd.conf I have now:

instatiate {
sql
noresetcounter
}

Freeradius still tries to load the sqlcounter module before the sql module

When I remove the symbolic links from mods enabled I get an error Cannot find module "sql"

het.oosten
  • 145
  • 5

1 Answers1

1

Ensure you have the configuration files from sql and sqlcounter symlinked from mods-available/ to mods-enabled/, then list an actual instance of the sqlcounter module.

The defaults are dailycounter, monthlycounter, noresetcounter, expire_on_login.

Where a module configuration is defined with two items before the curly brace, it's referenced with the second item.

<module name> [<instance name>] {
    config items...
}

instantiate {
    <instance name>
}

Where a module configuration is defined with one item before the curly brace, it's referenced with that first item.

<module name> {
    config items...
}

instantiate {
    <module name>
}

If you've renamed the SQL module, or added an instance name, ensure that's set as sql_module_instance in the sqlcounter module configuration.

Arran Cudbard-Bell
  • 1,514
  • 1
  • 9
  • 18
  • Thank you for the reply! Do I need to reconfigure the counters in module section? For example when I need the noresetcounter, do I need to set the variables like sqlmodule and check_name in the module section? – het.oosten Jun 28 '18 at 13:22
  • Not quite sure what you're asking here, so i'm going to go with no. If you use the default instances in ``raddb/mods-available/sqlcounter`` they should just work for most RADIUS installs. – Arran Cudbard-Bell Jun 28 '18 at 13:28