Javi's suggested changes, largely. New maintainer address.
[freeradius.git] / raddb / radiusd.conf.in
1 ##
2 ## radiusd.conf -- FreeRADIUS server configuration file.
3 ##
4 ##      http://www.freeradius.org/
5 ##
6
7 #
8 #       The location of other config files and
9 #       logfiles are declared in this file
10 #
11 #       Also general configuration for modules can be done
12 #       in this file, it is exported through the API to
13 #       modules that ask for it.
14 #
15
16 # Stuff from autoconf
17 prefix = @prefix@
18 exec_prefix = @exec_prefix@
19 sysconfdir = @sysconfdir@
20 localstatedir = @localstatedir@
21 sbindir = @sbindir@
22 logdir = @logdir@
23 libdir = @libdir@
24 raddbdir = @raddbdir@
25 radacctdir = @radacctdir@
26
27 #
28 #  Location of config and logfiles.
29 #
30 confdir    = ${raddbdir}
31
32 run_dir    = ${localstatedir}/run
33
34 #
35 #  pidfile: Where to place the PID of the RADIUS server.
36 #
37 #  The server may be signalled while it's running by using this
38 #  file.
39 #
40 #  e.g.:  kill -HUP `cat /var/run/radiusd.pid`
41 #
42 pidfile    = ${run_dir}/radiusd.pid
43
44 #
45 # user/group: The name (or #number) of the user/group to run httpd as.
46 #    On SCO (ODT 3) use "user = nouser" and "group = nogroup".
47 #    On HPUX you may not be able to use shared memory as nobody, and the
48 #    suggested workaround is to create a user www and use that user.
49 #
50 #  NOTE that some kernels refuse to setgid(group)
51 #  when the value of (unsigned)group is above 60000;
52 #  don't use group nobody on these systems!
53 #
54 #  On systems with shadow passwords, you might have to set 'group = shadow'
55 #  for the server to be able to read the shadow password file.
56 #
57 user = nobody
58 group = nobody
59
60 #
61 #  max_request_time: The maximum time (in seconds) to handle a request.
62 #
63 #  Requests which take more time than this to process are killed, and
64 #  a REJECT message is returned.
65 #
66 #  Useful range of values: 5 to 120
67 #
68 max_request_time        = 30
69
70 #
71 #  cleanup_delay: The time to wait (in seconds) before cleaning up
72 #  a reply which was sent to the NAS.
73 #
74 #  The RADIUS request is normally cached internally for a short period
75 #  of time, after the reply is sent to the NAS.  The reply packet may be
76 #  lost in the network, and the NAS will not see it.  The NAS will then
77 #  re-send the request, and the server will respond quickly with the
78 #  cached reply.
79 #
80 #  If this value is set too low, then duplicate requests from the NAS
81 #  MAY NOT be detected, and will instead be handled as seperate requests.
82 #
83 #  If this value is set too high, then the server will cache too many
84 #  requests, and some new requests may get blocked.  (See 'max_requests'.)
85 #
86 #  Useful range of values: 2 to 10
87 #
88 cleanup_delay           = 5
89
90 #
91 #  max_requests: The maximum number of requests which the server keeps
92 #  track of.  This should be 256 multiplied by the number of clients.
93 #  e.g. With 4 clients, this number should be 1024.
94 #
95 #  If this number is too low, then when the server becomes busy,
96 #  it will not respond to any new requests, until the 'cleanup_delay'
97 #  time has passed, and it has removed the old requests.
98 #
99 #  If this number is set too high, then the server will use a bit more
100 #  memory for no real benefit.
101 #
102 #  If you aren't sure what it should be set to, it's better to set it
103 #  too high than too low.  Setting it to 1000 per client is probably
104 #  the highest it should be.
105 #
106 #  Useful range of values: 256 to infinity
107 #
108 max_requests            = 1024
109
110 #
111 #  bind_address:  Make the server listen on a particular IP address, and
112 #  send replies out from that address.  This directive is most useful
113 #  for machines with multiple IP addresses on one interface.
114 #
115 #  It can either contain "*", or an IP address, or a fully qualified
116 #  Internet domain name.  The default is "*"
117 #
118 bind_address            = *
119
120 #
121 #  port: Allows you to bind FreeRADIUS to a specific port.
122 #
123 #  The default port that most NAS boxes use is 1645, which is historical.
124 #  RFC 2138 defines 1812 to be the new port.  Many new servers and
125 #  NAS boxes use 1812, which can create interoperability problems.
126 #
127 #  The port is defined here to be 0 so that the server will pick up
128 #  the machine's local configuration for the radius port, as defined
129 #  in /etc/services.
130 #
131 #  If you want to use the default RADIUS port as defined on your server,
132 #  (usually through 'grep radius /etc/services') set this to 0 (zero).
133 #
134 #  A port given on the command-line via '-p' over-rides this one.
135 #
136 port = 0
137
138 #
139 #  Which program to execute check doing concurrency checks.
140 #
141 checkrad   = ${sbindir}/checkrad
142
143 #
144 #  hostname_lookups: Log the names of clients or just their IP addresses
145 #  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
146 #  The default is off because it'd be overall better for the net if people
147 #  had to knowingly turn this feature on, since enabling it means that
148 #  each client request will result in AT LEAST one lookup request to the
149 #  nameserver.
150 #
151 #  Turning hostname lookups off also means that the server won't block
152 #  for 30 seconds, if it sees an IP address which has no name associated
153 #  with it.
154 #
155 # allowed values: {no, yes}
156 #
157 hostname_lookups        = no
158
159 #
160 #  Core dumps are a bad thing.  This should only be set to 'yes'
161 #  if you're debugging a problem with the server.
162 #
163 # allowed values: {no, yes}
164 #
165 allow_core_dumps        = no
166
167 #
168 #  Log the full User-Name attribute, as it was found in the request.
169 #
170 # allowed values: {no, yes}
171 #
172 log_stripped_names      = no
173
174 #
175 #  Log authentication requests to the log file.
176 #
177 # allowed values: {no, yes}
178 #
179 log_auth        = no
180
181 #
182 #  Log passwords with the authentication requests.
183 #  log_auth_badpass  - logs password if it's rejected
184 #  log_auth_goodpass - logs password if it's correct
185 #
186 # allowed values: {no, yes}
187 #
188 log_auth_badpass        = no
189 log_auth_goodpass       = no
190
191
192 # usercollide:  Turn user collision code on and off.
193 #               See README.usercollide
194 #
195 usercollide = no
196
197 # lower_user / lower_pass:  
198 # Lowercase the username/password "before" or "after"
199 # attempting to authenticate.  
200
201 # If "before", the server will first modify the request
202 # and then try to auth the user.  If "after", the server
203 # will first auth using the values provided by the
204 # user.  If that fails it will reprocess the request
205 # after modifying it as you specify below.
206
207 # This is as close as we can get to case insensitivity.  It is
208 # the admin's job to ensure that the username on the auth
209 # db side is *also* lowercase to make this work
210 #
211 # Default is 'no' (don't lowercase values)
212 # Valid values = "before" / "after" / "no"
213 #
214 lower_user = no
215 lower_pass = no
216
217 # nospace_user / nospace_pass:
218 # Some users like to enter spaces in their username or
219 # password incorrectly.  To save yourself the tech support
220 # call, you can eliminate those spaces here:
221 #
222 # Default is 'no' (don't remove spaces)
223 # Valid values = "before" / "after" / "no" (explanation above)
224 #
225 nospace_user = no
226 nospace_pass = no
227
228 #######################################################################
229 #
230 #  Include optional/module specific configurations.
231
232
233 # PROXY CONFIGURATION
234 #
235 #  proxy_requests: Turns proxying of RADIUS requests on or off.
236 #
237 #  The server has proxying turned on by default.  If your system is NOT
238 #  set up to proxy requests to another server, then you can turn proxying
239 #  off here.  This will save a small amount of resources on the server.
240 #
241 #  If you have proxying turned off, and your configuration files say
242 #  to proxy a request, then an error message will be logged.
243 #
244 # allowed values: {no, yes}
245 #
246 #  To disable proxying, change the "yes" to "no", and comment the
247 #  $INCLUDE line.
248 proxy_requests  = yes
249 $INCLUDE     ${confdir}/proxy.conf
250
251 # CLIENTS CONFIGURATION
252 #
253 #  Client configuration is defined in "clients.conf".  If you don't
254 #  use the "clients.conf", you can comment the following.  The use of
255 #  "clients.conf" is recommended over the old "clients", though both
256 #  are supported.
257 #
258 $INCLUDE      ${confdir}/clients.conf
259
260 # SNMP CONFIGURATION
261 #
262 #  Snmp configuration is only valid if you enabled SNMP support when
263 #  you compiled radius.  To enable SNMP configuration, uncomment the
264 #  following line.
265 $INCLUDE      ${confdir}/snmp.conf
266
267
268 #######################################################################
269 #
270 #  Thread pool configuration.
271 #
272 #  The thread pool is a long-lived group of threads which
273 #  take turns (round-robin) handling any incoming requests.
274 #
275 #
276 #  You probably want to have a few spare threads around,
277 #  so that high-load situations can be handled immediately.  If you
278 #  don't have any spare threads, then the request handling will
279 #  be delayed while a new thread is created, and added to the pool.
280 #
281 #  You probably don't want too many spare threads around,
282 #  otherwise they'll be sitting there taking up resources, and
283 #  not doing anything productive.
284 #
285 #  The numbers given below should be adequate for most situations.
286 #
287 #
288 thread pool {
289 #
290 #  Number of servers to start initially --- should be a reasonable ballpark
291 #  figure.
292 #
293         start_servers     = 5
294
295 #
296 #  Limit on the total number of servers running.
297 #
298 #  If this limit is ever reached, clients will be LOCKED OUT, so it
299 #  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
300 #  keep a runaway server from taking the system with it as it spirals
301 #  down...
302 #
303         max_servers       = 32
304
305 #
306 #  Server-pool size regulation.  Rather than making you guess how many
307 #  servers you need, FreeRADIUS dynamically adapts to the load it
308 #  sees --- that is, it tries to maintain enough servers to
309 #  handle the current load, plus a few spare servers to handle transient
310 #  load spikes.
311 #
312 #  It does this by periodically checking how many servers are waiting
313 #  for a request.  If there are fewer than min_spare_servers, it creates
314 #  a new spare.  If there are more than max_spare_servers, some of the
315 #  spares die off.  The default values are probably OK for most sites.
316 #
317         min_spare_servers = 3
318         max_spare_servers = 10
319
320 #
321 #  There may be memory leaks or resource allocation problems with
322 #  the server.  If so, set this value to 300 or so, so that the
323 #  resources will be cleaned up periodically.
324 #
325 #  This should only be necessary if there are serious bugs in the
326 #  server which have not yet been fixed.
327 #
328 #  '0' is a special value meaning 'infinity', or 'the servers never exit'
329 #
330         max_requests_per_server = 0
331 }
332
333 modules {
334         pam {
335                 #
336                 #  The name to use for PAM authentication.
337                 #  PAM looks in /etc/pam.d/${pam_auth_name}
338                 #  for it's configuration.
339                 #
340                 #  Note that any Pam-Auth attribute set in the 'users'
341                 #  file over-rides this one.
342                 #
343                 pam_auth = radiusd
344         }
345         unix {
346                 #
347                 #  Cache /etc/passwd, /etc/shadow, and /etc/group
348                 #
349                 #  The default is to NOT cache them.  However, caching them can
350                 #  speed up system authentications by a substantial amount.
351                 #
352                 # allowed values: {no, yes}
353                 cache           = no
354
355                 #
356                 #  Define the locations of the normal passwd, shadow, and
357                 #  group files.
358                 #
359                 #  'shadow' is commented out by default, because not all
360                 #  systems have shadow passwords.
361                 #
362                 passwd          = /etc/passwd
363                 #       shadow          = /etc/shadow
364                 group           = /etc/group
365
366
367                 #
368                 #  Where the 'wtmp' file is located.
369                 #  This will be moved to it's own module soon..
370                 #
371                 radwtmp = ${logdir}/radwtmp
372         }
373
374 # Uncomment this if you want to use ldap (Auth-Type = LDAP)
375 # Also uncomment it in the authenticate{} block below
376 #       ldap {
377 #               server   = localhost
378 #               login    = "cn=admin,o=My Org,c=US"
379 #               password = mypass
380 #               basedn   = "o=My Org,c=US"
381 #               filter   = "(uid=%u)"
382 #       }
383
384         #
385         #  You can have multiple instances of the realm module to
386         #  support multiple realm syntaxs at the same time.  The
387         #  search order is defined the order in the authorize and
388         #  preacct blocks after the module config block.
389         #
390         #  Two config options:
391         #       format     -  must be 'prefix' or 'suffix'
392         #       delimiter  -  must be a single character
393         #
394         #  'username@realm'
395         #
396         realm suffix {
397                 format = suffix
398                 delimiter = "@"
399         }
400
401         #
402         #  'realm/username'
403         #
404         #  Using this entry, IPASS users have their realm set to "IPASS".
405         #
406         #realm prefix {
407         #       format = prefix
408         #       delimiter = "/"
409         #}
410
411         #
412         #  'username%realm'
413         #
414         #realm percent {
415         #       format = suffix
416         #       delimiter = "%"
417         #}
418         
419
420         preprocess {
421                 huntgroups = ${confdir}/huntgroups
422                 hints = ${confdir}/hints
423
424                 #
425                 # This hack changes Ascend's wierd port numberings
426                 # to standard 0-??? port numbers so that the "+" works
427                 # for IP address assignments.
428                 #
429                 with_ascend_hack = no
430                 ascend_channels_per_line = 23
431
432                 #
433                 # Windows NT machines often authenticate themselves as
434                 # NT_DOMAIN\username
435                 #
436                 # If this is set to 'yes', then the NT_DOMAIN portion
437                 # of the user-name is silently discarded.
438                 #
439                 with_ntdomain_hack = no
440
441                 #
442                 # Specialix Jetstream 8500 24 port access server.
443                 #
444                 # If the user name is 10 characters or longer, a "/"
445                 # and the excess characters after the 10th are
446                 # appended to the user name.
447                 #
448                 # If you're not running that NAS, you don't need
449                 # this hack.
450                 #
451                 with_specialix_jetstream_hack = no
452         }
453         files {
454                 usersfile = ${confdir}/users
455                 acctusersfile = ${confdir}/acct_users
456
457                 #
458                 #  If you want to use the old Cistron 'users' file
459                 #  with FreeRADIUS, you should change the next line
460                 #  to 'compat = cistron'.  You can the copy your 'users'
461                 #  file from Cistron.
462                 #
463                 compat = no
464         }
465
466         # See README.rlm_fastusers before using this
467         # module or changing these values.
468         fastusers {
469                 usersfile = ${confdir}/users_fast
470                 hashsize = 1000
471                 compat = no
472                 # Reload the hash every 600 seconds (10mins)
473                 reload_hash = 600
474         }
475         
476         detail {
477                 detailfile = ${radacctdir}/%n/detail
478                 detailperm = 0600
479         }
480
481         # This module will add a (probably) unique session id 
482         # to an accounting packet based on the attributes listed
483         # below found in the packet.  see doc/README.rlm_acct_unique
484         acct_unique {
485                 key = "User-Name, Acct-Session-Id, NAS-IP-Address, NAS-Port-Id"
486         }
487
488
489 #
490 #  Configuration for the SQL module.
491 #
492         sql {
493         
494                 # Connect info
495                 server          = "localhost"
496                 login           = "root"
497                 password        = "rootpass"
498                 
499                 # Database table configuration
500                 radius_db       = "radius"
501                 acct_table      = "radacct"
502                 
503                 authcheck_table = "radcheck"
504                 authreply_table = "radreply"
505                 
506                 groupcheck_table = "radgroupcheck"
507                 groupreply_table = "radgroupreply"
508                 
509                 usergroup_table = "usergroup"
510                 
511                 realms_table    = "realms"
512                 realmgroup_table = "realmgroup"
513                 
514                 # Check case on usernames
515                 sensitiveusername = no
516         
517                 # Remove stale session if checkrad does not see a double login
518                 deletestalesessions = yes
519         
520                 # Print all SQL statements when in debug mode (-x)
521                 sqltrace        = no
522                 sqltracefile = ${logdir}/sqltrace.sql
523
524                 # number of sql connections to make to server
525                 num_sql_socks = 5
526         }
527
528 #
529 #  A second instance of the same module, with the name "sql2" to identify it
530 #
531         sql sql2 {
532         
533                 # Connect info
534                 server          = "myothersever"
535                 login           = "root"
536                 password        = "rootpass"
537                 
538                 # Database table configuration
539                 radius_db       = "radius"
540                 acct_table      = "radacct"
541                 
542                 authcheck_table = "radcheck"
543                 authreply_table = "radreply"
544                 
545                 groupcheck_table = "radgroupcheck"
546                 groupreply_table = "radgroupreply"
547                 
548                 usergroup_table = "usergroup"
549                 
550                 realms_table    = "realms"
551                 realmgroup_table = "realmgroup"
552                 
553                 # Check case on usernames
554                 sensitiveusername = no
555         
556                 # Remove stale session if checkrad does not see a double login
557                 deletestalesessions = yes
558         
559                 # Print all SQL statements when in debug mode (-x)
560                 sqltrace        = no
561         }
562
563 #
564 # The "always" module is here for debugging purposes. Each instance simply
565 # returns the same result, always, without doing anything.
566 #
567         always fail {
568                 rcode = fail
569         }
570         always reject {
571                 rcode = reject
572         }
573         always ok {
574                 rcode = ok
575                 simulcount = 0
576                 mpp = no
577         }
578
579 #######################################################################
580 #
581 #       Configuration for the example module.  Uncommenting it will cause it
582 #       to get loaded and initialized, but should have no real effect as long
583 #       it is not referencened in one of the autz/auth/preacct/acct sections
584 #
585        example {
586        #
587        #  Boolean variable.
588        #
589        # allowed values: {no, yes}
590        #
591                boolean          = yes
592
593        #
594        #  An integer, of any value.
595        #
596                integer          = 16
597
598        #
599        #  A string.
600        #
601                string           = "This is an example configuration string"
602
603        #
604        # An IP address, either in dotted quad (1.2.3.4) or hostname
605        # (example.com)
606        #
607                ipaddr           = 127.0.0.1
608
609        #
610        # A subsection
611        #
612                mysubsection {
613                        anotherinteger = 1000
614        #
615        # They nest
616        #
617                        deeply nested {
618                                string = "This is a different string"
619                        }
620                }
621        }
622 }
623
624 # Authentication types, Auth-Type = System and PAM for now.
625 authenticate {
626         pam
627         unix
628 # By grouping modules together in an authtype block, that authtype will be
629 # tried on each module in sequence until one returns REJECT or OK. This
630 # allows authentication failover if the first SQL server has crashed, for
631 # example.
632 #       authtype SQL {
633 #               sql
634 #               sql2
635 #       }
636 # Uncomment this if you want to use ldap (Auth-Type = LDAP)
637 #       ldap
638 }
639
640 # Authorization. First preprocess (hints and huntgroups files),
641 # then realms, and finally look in the "users" file.
642 # The order of the realm modules will determine the order that
643 # we try to find a matching realm.
644 # Make *sure* that 'preprocess' comes before any realm if you 
645 # need to setup hints for the remote radius server
646 authorize {
647         preprocess
648         suffix
649         files
650 }
651
652 # Pre-accounting. Look for proxy realm in order of realms, then 
653 # acct_users file, then preprocess (hints file).
654 preacct {
655         suffix
656         files
657         preprocess
658 }
659
660 # Accounting. Log to detail file, and to the radwtmp file.
661 accounting {
662         #acct_unique
663         detail
664         unix
665 }
666
667 # Session database, used for checking Simultaneous-Use. The radutmp module
668 # handles this
669 session {
670 #       radutmp
671 }