blob: 8ffb7648fda60c0ca9b7817078d5fd63cd25eb0c [file] [log] [blame]
Chetan Gaonker7f4bf742016-05-04 15:56:08 -07001Modules in Version 3
2====================
3
4As of Version 3, all of the modules have been places in the
5"mods-available/" directory. This practice follows that used by other
6servers such as Nginx, Apache, etc. The "modules" directory should
7not be used.
8
9Modules are enabled by creating a file in the mods-enabled/ directory.
10You can also create a soft-link from one directory to another::
11
12 $ cd raddb/mods-enabled
13 $ ln -s ../mods-available/foo
14
15This will enable module "foo". Be sure that you have configured the
16module correctly before enabling it, otherwise the server will not
17start. You can verify the server configuration by running
18"radiusd -XC".
19
20A large number of modules are enabled by default. This allows the
21server to work with the largest number of authentication protocols.
22Please be careful when disabling modules. You will likely need to
23edit the "sites-enabled/" files to remove references to any disabled
24modules.
25
26Conditional Modules
27-------------------
28
29Version 3 allows modules to be conditionally loaded. This is useful
30when you want to have a virtual server which references a module, but
31does not require it. Instead of editing the virtual server file, you
32can just conditionally enable the module.
33
34Modules are conditionally enabled by adding a "-" before their name in
35a virtual server. For example, you can do::
36
37 server {
38 authorize {
39 ...
40 ldap
41 -sql
42 ...
43 }
44 }
45
46This says "require the LDAP module, but use the SQL module only if it
47is configured."
48
49This feature is not very useful for production configurations. It is,
50however, very useful for the default examples that ship with the
51server.
52
53Ignoring module
54---------------
55
56If you see this message::
57
58 Ignoring module (see raddb/mods-available/README.rst)
59
60Then you are in the right place. Most of the time this message can be
61ignored. The message can be fixed by find the references to "-module"
62in the virtual server, and deleting them.
63
64Another way to fix it is to configure the module, as described above.
65
66Simplification
67--------------
68
69Allowing conditional modules simplifies the default virtual servers
70that are shipped with FreeRADIUS. This means that if you want to
71enable LDAP (for example), you no longer need to edit the files in
72raddb/sites-available/ in order to enable it.
73
74Instead, you should edit the raddb/mods-available/ldap file to point
75to your local LDAP server. Then, enable the module via the soft-link
76method described above.
77
78Once the module is enabled, it will automatically be used in the
79default configuration.