Add second patch from Novell for creating a postauth method in order to
[freeradius.git] / raddb / radiusd.conf.in
index 94cdc7b..4715913 100644 (file)
@@ -40,6 +40,19 @@ run_dir = ${localstatedir}/run/radiusd
 log_file = ${logdir}/radius.log
 
 #
+#  Destination for log messages.  This can be one of:
+#
+#      files - log to ${log_file}, as defined above.
+#      syslog - to syslog (see also the log{} section, below)
+#      stdout - standard output
+#      stderr - standard error.
+#
+#  The command-line option "-X" over-rides this option, and forces
+#  logging to go to stdout.
+#
+log_destination = files
+
+#
 # libdir: Where to find the rlm_* modules.
 #
 #   This should be automatically set at configuration time.
@@ -181,6 +194,9 @@ max_requests = 1024
 #  It can either contain "*", or an IP address, or a fully qualified
 #  Internet domain name.  The default is "*"
 #
+#  As of 1.0, you can also use the "listen" directive.  See below for
+#  more information.
+#
 bind_address = *
 
 #  port: Allows you to bind FreeRADIUS to a specific port.
@@ -198,8 +214,52 @@ bind_address = *
 #
 #  A port given on the command-line via '-p' over-rides this one.
 #
+#  As of 1.0, you can also use the "listen" directive.  See below for
+#  more information.
+#
 port = 0
 
+#
+#  By default, the server uses "bind_address" to listen to all IP's
+#  on a machine, or just one IP.  The "port" configuration is used
+#  to select the authentication port used when listening on those
+#  addresses.
+#
+#  If you want the server to listen on additional addresses, you can
+#  use the "listen" section.  A sample section (commented out) is included
+#  below.  This "listen" section duplicates the functionality of the
+#  "bind_address" and "port" configuration entries, but it only listens
+#  for authentication packets.
+#
+#  If you comment out the "bind_address" and "port" configuration entries,
+#  then it becomes possible to make the server accept only accounting,
+#  or authentication packets.  Previously, it always listened for both
+#  types of packets, and it was impossible to make it listen for only
+#  one type of packet.
+#
+#listen {
+       #  IP address on which to listen.
+       #  Allowed values are:
+       #       dotted quad (1.2.3.4)
+       #       hostname    (radius.example.com)
+       #       wildcard    (*)
+#      ipaddr = *
+
+       #  Port on which to listen.
+       #  Allowed values are:
+       #       integer port number (1812)
+       #       0 means "use /etc/services for the proper port"
+#      port = 0
+
+       #  Type of packets to listen for.
+       #  Allowed values are:
+       #       auth    listen for authentication packets
+       #       acct    listen for accounting packets
+       #
+#      type = auth
+#}
+
+
 #  hostname_lookups: Log the names of clients or just their IP addresses
 #  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
 #
@@ -236,6 +296,20 @@ allow_core_dumps = no
 regular_expressions    = @REGEX@
 extended_expressions   = @REGEX_EXTENDED@
 
+#
+#  Logging section.  The various "log_*" configuration items
+#  will eventually be moved here.
+#
+log {
+       #
+       #  Which syslog facility to use, if ${log_destination} == "syslog"
+       #
+       #  The exact values permitted here are OS-dependent.  You probably
+       #  don't want to change this.
+       #
+       syslog_facility = daemon
+}
+
 #  Log the full User-Name attribute, as it was found in the request.
 #
 # allowed values: {no, yes}
@@ -260,6 +334,18 @@ log_auth_goodpass = no
 # usercollide:  Turn "username collision" code on and off.  See the
 # "doc/duplicate-users" file
 #
+#  WARNING
+#  !!!!!!!  Setting this to "yes" may result in the server behaving
+#  !!!!!!!  strangely.  The "username collision" code will ONLY work
+#  !!!!!!!  with clear-text passwords.  Even then, it may not do what
+#  !!!!!!!  you want, or what you expect.
+#  !!!!!!!
+#  !!!!!!!  We STRONGLY RECOMMEND that you do not use this feature,
+#  !!!!!!!  and that you find another way of acheiving the same goal.
+#  !!!!!!!
+#  !!!!!!!  e,g. module fail-over.  See 'doc/configurable_failover'
+#  WARNING
+#
 usercollide = no
 
 # lower_user / lower_pass:  
@@ -343,7 +429,7 @@ security {
        #  However, certain NAS boxes may require them. 
        #
        #  When sent a Status-Server message, the server responds with
-       #  and Access-Accept packet, containing a Reply-Message attribute,
+       #  an Access-Accept packet, containing a Reply-Message attribute,
        #  which is a string describing how long the server has been
        #  running.
        #
@@ -505,6 +591,8 @@ modules {
        #  crypt: Unix crypt
        #    md5: MD5 ecnryption
        #   sha1: SHA1 encryption.
+       #     nt: NT-Password encryption
+       #     lm: LM-Password encryption
        #  DEFAULT: crypt
        pap {
                encryption_scheme = crypt
@@ -523,6 +611,10 @@ modules {
        #  For Linux, see:
        #       http://www.kernel.org/pub/linux/libs/pam/index.html
        #
+       #  WARNING: On many systems, the system PAM libraries have
+       #           memory leaks!  We STRONGLY SUGGEST that you do not
+       #           use PAM for authentication, due to those memory leaks.
+       #
        pam {
                #
                #  The name to use for PAM authentication.
@@ -544,12 +636,12 @@ modules {
                #
                #  The default is to NOT cache them.
                #
-               #  For FreeBSD, you do NOT want to enable the cache,
-               #  as it's password lookups are done via a database, so
-               #  set this value to 'no'.
+               #  For FreeBSD and NetBSD, you do NOT want to enable
+               #  the cache, as it's password lookups are done via a
+               #  database, so set this value to 'no'.
                #
                #  Some systems (e.g. RedHat Linux with pam_pwbd) can
-               #  take *seconds* to check a password, from a passwd
+               #  take *seconds* to check a password, when th passwd
                #  file containing 1000's of entries.  For those systems,
                #  you should set the cache value to 'yes', and set
                #  the locations of the 'passwd', 'shadow', and 'group'
@@ -579,9 +671,8 @@ modules {
                #       shadow = /etc/shadow
                #       group = /etc/group
 
-
                #
-               #  Where the 'wtmp' file is located.
+               #  The location of the "wtmp" file.
                #  This should be moved to it's own module soon.
                #
                #  The only use for 'radlast'.  If you don't use
@@ -592,74 +683,10 @@ modules {
 
        #  Extensible Authentication Protocol
        #
-       #  For all EAP related authentications 
-       eap {
-               #  Invoke the default supported EAP type when
-               #  EAP-Identity response is received.
-               #
-               #  The incoming EAP messages MAY NOT specify which EAP
-               #  type they will be using, so it MUST be set here.
-               #
-               #  For now, only one default EAP type may be used at a time.
-               #
-               default_eap_type = md5
-
-               # Default expiry time to clean the EAP list,
-               # It is maintained to correlate the
-               # EAP-response for each EAP-request sent.
-               timer_expire     = 60
-
-               # Supported EAP-types
-               md5 {
-               }
-
-               # Cisco LEAP
-               #
-               #  Cisco LEAP uses the MS-CHAP algorithm (but not
-               #  the MS-CHAP attributes) to perform it's authentication.
-               #
-               #  As a result, LEAP *requires* access to the plain-text
-               #  User-Password, or the NT-Password attributes.
-               #  'System' authentication is impossible with LEAP.
-               #
-               leap {
-               }
-
-               ## EAP-TLS is highly experimental EAP-Type at the moment.  
-               #       Please give feedback on the mailing list.
-               #tls {
-               #       private_key_password = password
-               #       private_key_file = /path/filename
-
-               #       If Private key & Certificate are located in the
-               #       same file, then private_key_file & certificate_file
-               #       must contain the same file name.
-               #       certificate_file = /path/filename
-
-               #       Trusted Root CA list
-                       #CA_file = /path/filename
-
-               #       dh_file = /path/filename
-                       #random_file = /path/filename
-               #
-               #       This can never exceed MAX_RADIUS_LEN (4096)
-               #       preferably half the MAX_RADIUS_LEN, to
-               #       accomodate other attributes in RADIUS packet.
-               #       On most APs the MAX packet length is configured
-               #       between 1500 - 1600. In these cases, fragment
-               #       size should be <= 1024.
-               #
-               #               fragment_size = 1024
-
-               #       include_length is a flag which is by default set to yes
-               #       If set to yes, Total Length of the message is included
-               #       in EVERY packet we send.
-               #       If set to no, Total Length of the message is included
-               #       ONLY in the First packet of a fragment series.
-               #
-               #               include_length = yes
-               #}
-       }
+       #  For all EAP related authentications.
+       #  Now in another file, because it is very large.
+       #
+$INCLUDE ${confdir}/eap.conf
 
        # Microsoft CHAP authentication
        #
@@ -682,15 +709,38 @@ modules {
                # if use_mppe is not set to no mschap will
                # add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
                # MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
-               #       use_mppe = no
+               #
+               #use_mppe = no
 
                # if mppe is enabled require_encryption makes
                # encryption moderate
-               #       require_encryption = yes
+               #
+               #require_encryption = yes
 
                # require_strong always requires 128 bit key
                # encryption
-               #       require_strong = yes
+               #
+               #require_strong = yes
+
+               # Windows sends us a username in the form of
+               # DOMAIN\user, but sends the challenge response
+               # based on only the user portion.  This hack
+               # corrects for that incorrect behavior.
+               #
+               #with_ntdomain_hack = no
+
+               # The module can perform authentication itself, OR
+               # use a Windows Domain Controller.  This configuration
+               # directive tells the module to call the ntlm_auth
+               # program, which will do the authentication, and return
+               # the NT-Key.  Note that you MUST have "winbindd" and
+               # "nmbd" running on the local machine for ntlm_auth
+               # to work.  See the ntlm_auth program documentation
+               # for details.
+               #
+               # Be VERY careful when editing the following line!
+               #
+               #ntlm_auth = "/path/to/ntlm_auth --request-nt-key --username=%{Stripped-User-Name:-%{User-Name:-None}} --challenge=%{mschap:Challenge:-00} --nt-response=%{mschap:NT-Response:-00}"
        }
 
        # Lightweight Directory Access Protocol (LDAP)
@@ -706,27 +756,60 @@ modules {
                # password = mypass
                basedn = "o=My Org,c=UA"
                filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
+               # base_filter = "(objectclass=radiusprofile)"
 
                # set this to 'yes' to use TLS encrypted connections
                # to the LDAP database by using the StartTLS extended
                # operation.
+               # The StartTLS operation is supposed to be used with normal
+               # ldap connections instead of using ldaps (port 689) connections
                start_tls = no
-               # set this to 'yes' to use TLS encrypted connections to the
-               # LDAP database by passing the LDAP_OPT_X_TLS_TRY option to
-               # the ldap library.
-               tls_mode = no
+
+               # tls_cacertfile        = /path/to/cacert.pem
+               # tls_cacertdir         = /path/to/ca/dir/
+               # tls_certfile          = /path/to/radius.crt
+               # tls_keyfile           = /path/to/radius.key
+               # tls_randfile          = /path/to/rnd
+               # tls_require_cert      = "demand"
 
                # default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
                # profile_attribute = "radiusProfileDn"
-               access_attr = "dialupAccess"
+               access_attr = "dialupAccess"
 
                # Mapping of RADIUS dictionary attributes to LDAP
                # directory attributes.
                dictionary_mapping = ${raddbdir}/ldap.attrmap
 
                ldap_connections_number = 5
+
+               #
+               # NOTICE: The password_header directive is NOT case insensitive
+               #
                # password_header = "{clear}"
+               #
+               #  The server can usually figure this out on its own, and pull
+               #  the correct User-Password or NT-Password from the database.
+               #
+               #  Note that NT-Passwords MUST be stored as a 32-digit hex
+               #  string, and MUST start off with "0x", such as:
+               #
+               #       0x000102030405060708090a0b0c0d0e0f
+               #
+               #  Without the leading "0x", NT-Passwords will not work.
+               #  This goes for NT-Passwords stored in SQL, too.
+               #
+               # Set password_attribute = nspmPassword to get user's password
+               # from a Novell eDirectory backend. This will work *only if*
+               # freeRADIUS is configured to build with --with-edir option.
+               #                                                                               
                # password_attribute = userPassword
+               #
+               # Un-comment the following to disable Novell eDirectory account
+               # policy check and intruder detection. This will work *only if*
+               # FreeRADIUS is configured to build with --with-edir option.
+               #
+               # edir_account_policy_check=no
+               #
                # groupname_attribute = cn
                # groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
                # groupmembership_attribute = radiusGroupName
@@ -734,6 +817,7 @@ modules {
                timelimit = 3
                net_timeout = 1
                # compare_check_items = yes
+               # do_xlat = yes
                # access_attr_used_for_allow = yes
        }
 
@@ -749,6 +833,9 @@ modules {
        #            Field marked as '*' is key field. That is, the parameter
        #            with this name from the request is used to search for
        #            the record from passwd file
+       #            Attribute marked as '=' is added to reply_itmes instead
+       #            of default configure_itmes
+       #            Attribute marked as '~' is added to request_items
        #
        #            Field marked as ',' may contain a comma separated list
        #            of attributes.
@@ -779,7 +866,7 @@ modules {
        #
        #passwd etc_group {
        #       filename = /etc/group
-       #       format = "Group-Name:::*,User-Name"
+       #       format = "=Group-Name:::*,User-Name"
        #       hashsize = 50
        #       ignorenislike = yes
        #       allowmultiplekeys = yes
@@ -790,19 +877,31 @@ modules {
        #
        #  You can have multiple instances of the realm module to
        #  support multiple realm syntaxs at the same time.  The
-       #  search order is defined the order in the authorize and
-       #  preacct blocks after the module config block.
+       #  search order is defined by the order in the authorize and
+       #  preacct sections.
+       #
+       #  Four config options:
+       #       format         -  must be 'prefix' or 'suffix'
+       #       delimiter      -  must be a single character
+       #       ignore_default -  set to 'yes' or 'no'
+       #       ignore_null    -  set to 'yes' or 'no'
+       #
+       #  ignore_default and ignore_null can be set to 'yes' to prevent
+       #  the module from matching against DEFAULT or NULL realms.  This
+       #  may be useful if you have have multiple instances of the
+       #  realm module.
+       #
+       #  They both default to 'no'.
        #
-       #  Two config options:
-       #       format     -  must be 'prefix' or 'suffix'
-       #       delimiter  -  must be a single character
 
        #  'realm/username'
        #
        #  Using this entry, IPASS users have their realm set to "IPASS".
-       realm realmslash {
+       realm IPASS {
                format = prefix
                delimiter = "/"
+               ignore_default = no
+               ignore_null = no
        }
 
        #  'username@realm'
@@ -810,6 +909,8 @@ modules {
        realm suffix {
                format = suffix
                delimiter = "@"
+               ignore_default = no
+               ignore_null = no
        }
 
        #  'username%realm'
@@ -817,12 +918,58 @@ modules {
        realm realmpercent {
                format = suffix
                delimiter = "%"
+               ignore_default = no
+               ignore_null = no
+       }
+
+       #
+       #  'domain\user'
+       #
+       realm ntdomain {
+               format = prefix
+               delimiter = "\\"
+               ignore_default = no
+               ignore_null = no
+       }       
+
+       #  A simple value checking module
+       #
+       #  It can be used to check if an attribute value in the request
+       #  matches a (possibly multi valued) attribute in the check
+       #  items This can be used for example for caller-id
+       #  authentication.  For the module to run, both the request
+       #  attribute and the check items attribute must exist
+       #
+       #  i.e.
+       #  A user has an ldap entry with 2 radiusCallingStationId
+       #  attributes with values "12345678" and "12345679".  If we
+       #  enable rlm_checkval, then any request which contains a
+       #  Calling-Station-Id with one of those two values will be
+       #  accepted.  Requests with other values for
+       #  Calling-Station-Id will be rejected.
+       #
+       #  Regular expressions in the check attribute value are allowed
+       #  as long as the operator is '=~'
+       #
+       checkval {
+               # The attribute to look for in the request
+               item-name = Calling-Station-Id
+
+               # The attribute to look for in check items. Can be multi valued
+               check-name = Calling-Station-Id
+
+               # The data type. Can be
+               # string,integer,ipaddr,date,abinary,octets
+               data-type = string
+
+               # If set to yes and we dont find the item-name attribute in the
+               # request then we send back a reject
+               # DEFAULT is no
+               #notfound-reject = no
        }
        
        #  rewrite arbitrary packets.  Useful in accounting and authorization.
        #
-       ## This module is highly experimental at the moment.  Please give 
-       ## feedback to the mailing list.
        #
        #  The module can also use the Rewrite-Rule attribute. If it
        #  is set and matches the name of the module instance, then
@@ -830,13 +977,19 @@ modules {
        #
        #  Also if new_attribute is set to yes then a new attribute
        #  will be created containing the value replacewith and it
-       #  will be added to searchin (packet, reply or config).
+       #  will be added to searchin (packet, reply, proxy, proxy_reply or config).
        # searchfor,ignore_case and max_matches will be ignored in that case.
+       #
+       # Backreferences are supported: %{0} will contain the string the whole match
+       # and %{1} to %{8} will contain the contents of the 1st to the 8th parentheses
+       #
+       # If max_matches is greater than one the backreferences will correspond to the
+       # first match
 
        #
        #attr_rewrite sanecallerid {
        #       attribute = Called-Station-Id
-               # may be "packet", "reply", or "config"
+               # may be "packet", "reply", "proxy", "proxy_reply" or "config"
        #       searchin = packet
        #       searchfor = "[+ ]"
        #       replacewith = ""
@@ -870,6 +1023,10 @@ modules {
                #
                # If this is set to 'yes', then the NT_DOMAIN portion
                # of the user-name is silently discarded.
+               #
+               # This configuration entry SHOULD NOT be used.
+               # See the "realms" module for a better way to handle
+               # NT domains.
                with_ntdomain_hack = no
 
                # Specialix Jetstream 8500 24 port access server.
@@ -882,8 +1039,8 @@ modules {
                # this hack.
                with_specialix_jetstream_hack = no
 
-               # Cisco sends it's VSA attributes with the attribute
-               # name *again* in the string, like:
+               # Cisco (and Quintum in Cisco mode) sends it's VSA attributes
+               # with the attribute name *again* in the string, like:
                #
                #   H323-Attribute = "h323-attribute=value".
                #
@@ -893,8 +1050,8 @@ modules {
                #
                #  H323-Attribute = "value"
                #
-               # If you're not running a Cisco NAS, you don't need
-               # this hack.
+               # If you're not running a Cisco or Quintum NAS, you don't
+               # need this hack.
                with_cisco_vsa_hack = no
        }
 
@@ -947,6 +1104,71 @@ modules {
                detailperm = 0600
        }
 
+       #
+       #  Many people want to log authentication requests.
+       #  Rather than modifying the server core to print out more
+       #  messages, we can use a different instance of the 'detail'
+       #  module, to log the authentication requests to a file.
+       #
+       #  You will also need to un-comment the 'auth_log' line
+       #  in the 'authorize' section, below.
+       #
+       # detail auth_log {
+               # detailfile = ${radacctdir}/%{Client-IP-Address}/auth-detail-%Y%m%d
+
+               #
+               #  This MUST be 0600, otherwise anyone can read
+               #  the users passwords!
+               # detailperm = 0600
+       # }
+
+       #
+       #  This module logs authentication reply packets sent
+       #  to a NAS.  Both Access-Accept and Access-Reject packets
+       #  are logged.
+       #
+       #  You will also need to un-comment the 'reply_log' line
+       #  in the 'post-auth' section, below.
+       #
+       # detail reply_log {
+               # detailfile = ${radacctdir}/%{Client-IP-Address}/reply-detail-%Y%m%d
+
+               #
+               #  This MUST be 0600, otherwise anyone can read
+               #  the users passwords!
+               # detailperm = 0600
+       # }
+
+       #
+       #  This module logs packets proxied to a home server.
+       #
+       #  You will also need to un-comment the 'pre_proxy_log' line
+       #  in the 'pre-proxy' section, below.
+       #
+       # detail pre_proxy_log {
+               # detailfile = ${radacctdir}/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d
+
+               #
+               #  This MUST be 0600, otherwise anyone can read
+               #  the users passwords!
+               # detailperm = 0600
+       # }
+
+       #
+       #  This module logs response packets from a home server.
+       #
+       #  You will also need to un-comment the 'post_proxy_log' line
+       #  in the 'post-proxy' section, below.
+       #
+       # detail post_proxy_log {
+               # detailfile = ${radacctdir}/%{Client-IP-Address}/post-proxy-detail-%Y%m%d
+
+               #
+               #  This MUST be 0600, otherwise anyone can read
+               #  the users passwords!
+               # detailperm = 0600
+       # }
+
        # Create a unique accounting session Id.  Many NASes re-use or
        # repeat values for Acct-Session-Id, causing no end of
        # confusion.
@@ -957,7 +1179,7 @@ modules {
        #  more information.
        #
        acct_unique {
-               key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port-Id"
+               key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
        }
 
 
@@ -972,6 +1194,16 @@ modules {
        #
        $INCLUDE  ${confdir}/sql.conf
 
+
+       #  For Cisco VoIP specific accounting with Postgresql,
+       #  use:         ${confdir}/pgsql-voip.conf
+       #
+       #  You will also need the sql schema from:
+       #        src/billing/cisco_h323_db_schema-postgres.sql
+       #  Note: This config can be use AS WELL AS the standard sql
+       #  config if you need SQL based Auth
+       
+
        #  Write a 'utmp' style file, of which users are currently
        #  logged in, and where they've logged in from.
        #
@@ -994,8 +1226,10 @@ modules {
                #  characters, so that will limit the possible choices
                #  of keys.
                #
+               #  You may want instead: %{Stripped-User-Name:-%{User-Name}}
                username = %{User-Name}
 
+
                #  Whether or not we want to treat "user" the same
                #  as "USER", or "User".  Some systems have problems
                #  with case sensitivity, so this should be set to
@@ -1040,6 +1274,7 @@ modules {
                attrsfile = ${confdir}/attrs
        }
 
+       #  counter module:
        #  This module takes an attribute (count-attribute).
        #  It also takes a key, and creates a counter for each unique
        #  key.  The count is incremented when accounting packets are
@@ -1051,6 +1286,12 @@ modules {
        #
        #  The 'reset' parameter defines when the counters are all reset to
        #  zero.  It can be hourly, daily, weekly, monthly or never.
+       #
+       #  hourly: Reset on 00:00 of every hour
+       #  daily: Reset on 00:00:00 every day
+       #  weekly: Reset on 00:00:00 on sunday
+       #  monthly: Reset on 00:00:00 of the first day of each month
+       #
        #  It can also be user defined. It should be of the form:
        #  num[hdwm] where:
        #  h: hours, d: days, w: weeks, m: months
@@ -1075,8 +1316,13 @@ modules {
        #  If check-name is set and the user is to be rejected then we
        #  send back a Reply-Message and we log a Failure-Message in
        #  the radius.log
+       #  If the count attribute is Acct-Session-Time then on each login
+       #  we send back the remaining online time as a Session-Timeout attribute
+       #  ELSE and if the return-attribute is set, we send back that attribute.
+       #  The return-attribute is set MUST be of an integer type
        #
-       #  The counter-name can also be used like below:
+       #  The counter-name can also be used instead of using the check-name
+       #  like below:
        #
        #  DEFAULT  Daily-Session-Time > 3600, Auth-Type = Reject
        #      Reply-Message = "You've used up more than one hour today"
@@ -1100,6 +1346,7 @@ modules {
                counter-name = Daily-Session-Time
                check-name = Max-Daily-Session
                allowed-servicetype = Framed-User
+               #return-attribute = Session-Timeout
                cache-size = 5000
        }
 
@@ -1119,13 +1366,266 @@ modules {
        }
 
        #
-       #  The 'expression' module current has no configuration.
+       #  The 'expression' module currently has no configuration.
+       #
+       #  This module is useful only for 'xlat'.  To use it,
+       #  put 'exec' into the 'instantiate' section.  You can then
+       #  do dynamic translation of attributes like:
+       #
+       #  Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`
+       #
+       #  The value of the attribute will be replaced with the output
+       #  of the program which is executed.  Due to RADIUS protocol
+       #  limitations, any output over 253 bytes will be ignored.
+       #
+       #  The module also registers a few paircompare functions
        expr {
        }
 
+       #
+       #  The 'digest' module currently has no configuration.
+       #
+       #  "Digest" authentication against a Cisco SIP server.
+       #  See 'doc/rfc/draft-sterman-aaa-sip-00.txt' for details
+       #  on performing digest authentication for Cisco SIP servers.
+       #
+       digest {
+       }
+
+       #
+       # The expiration module. This handles the Expiration attribute
+       # It should be included in the *end* of the authorize section
+       # in order to handle user Expiration. It should also be included
+       # in the instantiate section in order to register the Expiration
+       # compare function
+       #
+       expiration {
+               #
+               # The Reply-Message which will be sent back in case the
+               # account has expired. Dynamic substitution is supported
+               #
+               reply-message = "Password Has Expired\r\n" 
+#              reply-message = "Your account has expired, %{User-Name}\r\n"
+       }
+
+       # The logintime module. This handles the Login-Time,
+       # Current-Time, and Time-Of-Day attributes.  It should be
+       # included in the *end* of the authorize section in order to
+       # handle Login-Time checks. It should also be included in the
+       # instantiate section in order to register the Current-Time
+       # and Time-Of-Day comparison functions.
+       #
+       # When the Login-Time attribute is set to some value, and the
+       # user has bene permitted to log in, a Session-Timeout is
+       # calculated based on the remaining time.  See "doc/README".
+       #
+       logintime {
+               #
+               # The Reply-Message which will be sent back in case
+               # the account is calling outside of the allowed
+               # timespan. Dynamic substitution is supported.
+               #
+               reply-message = "You are calling outside your allowed timespan\r\n"
+#              reply-message = "Outside allowed timespan (%{check:Login-Time}), %{User-Name}\r\n"
+
+               # The minimum timeout (in seconds) a user is allowed
+               # to have. If the calculated timeout is lower we don't
+               # allow the logon. Some NASes do not handle values
+               # lower than 60 seconds well.
+               minimum-timeout = 60
+       }
+       #
+       #  Execute external programs
+       #
+       #  This module is useful only for 'xlat'.  To use it,
+       #  put 'exec' into the 'instantiate' section.  You can then
+       #  do dynamic translation of attributes like:
+       #
+       #  Attribute-Name = `%{exec:/path/to/program args}`
+       #
+       #  The value of the attribute will be replaced with the output
+       #  of the program which is executed.  Due to RADIUS protocol
+       #  limitations, any output over 253 bytes will be ignored.
+       #
+       #  The RADIUS attributes from the user request will be placed
+       #  into environment variables of the executed program, as
+       #  described in 'doc/variables.txt'
+       #
+       exec {
+               wait = yes
+               input_pairs = request
+               shell_escape = yes
+       }
+
+       #
+       #  This is a more general example of the execute module.
+       #
+       #  This one is called "echo".
+       #
+       #  Attribute-Name = `%{echo:/path/to/program args}`
+       #
+       #  If you wish to execute an external program in more than
+       #  one section (e.g. 'authorize', 'pre_proxy', etc), then it
+       #  is probably best to define a different instance of the
+       #  'exec' module for every section.     
+       #
+       #  The return value of the program run determines the result
+       #  of the exec instance call as follows:
+       #  (See doc/configurable_failover for details)
+       #
+       #  < 0 : fail      the module failed
+       #  = 0 : ok        the module succeeded
+       #  = 1 : reject    the module rejected the user
+       #  = 2 : fail      the module failed
+       #  = 3 : ok        the module succeeded
+       #  = 4 : handled   the module has done everything to handle the request
+       #  = 5 : invalid   the user's configuration entry was invalid
+       #  = 6 : userlock  the user was locked out
+       #  = 7 : notfound  the user was not found
+       #  = 8 : noop      the module did nothing
+       #  = 9 : updated   the module updated information in the request
+       #  > 9 : fail      the module failed
+       #
+       exec echo {
+               #
+               #  Wait for the program to finish.
+               #
+               #  If we do NOT wait, then the program is "fire and
+               #  forget", and any output attributes from it are ignored.
+               #
+               #  If we are looking for the program to output
+               #  attributes, and want to add those attributes to the
+               #  request, then we MUST wait for the program to
+               #  finish, and therefore set 'wait=yes'
+               #
+               # allowed values: {no, yes}
+               wait = yes
+
+               #
+               #  The name of the program to execute, and it's
+               #  arguments.  Dynamic translation is done on this
+               #  field, so things like the following example will
+               #  work.
+               #
+               program = "/bin/echo %{User-Name}"
+
+               #
+               #  The attributes which are placed into the
+               #  environment variables for the program.
+               #
+               #  Allowed values are:
+               #
+               #       request         attributes from the request
+               #       config          attributes from the configuration items list
+               #       reply           attributes from the reply
+               #       proxy-request   attributes from the proxy request
+               #       proxy-reply     attributes from the proxy reply
+               #
+               #  Note that some attributes may not exist at some
+               #  stages.  e.g. There may be no proxy-reply
+               #  attributes if this module is used in the
+               #  'authorize' section.
+               #
+               input_pairs = request
+
+               #
+               #  Where to place the output attributes (if any) from
+               #  the executed program.  The values allowed, and the
+               #  restrictions as to availability, are the same as
+               #  for the input_pairs.
+               #
+               output_pairs = reply
+
+               #
+               #  When to execute the program.  If the packet
+               #  type does NOT match what's listed here, then
+               #  the module does NOT execute the program.
+               #
+               #  For a list of allowed packet types, see
+               #  the 'dictionary' file, and look for VALUEs
+               #  of the Packet-Type attribute.
+               #
+               #  By default, the module executes on ANY packet.
+               #  Un-comment out the following line to tell the
+               #  module to execute only if an Access-Accept is
+               #  being sent to the NAS.
+               #
+               #packet_type = Access-Accept
+
+               #
+               #  Should we escape the environment variables?
+               #  
+               #  If this is set, all the RADIUS attributes
+               #  are capitalised and dashes replaced with
+               #  underscores. Also, RADIUS values are surrounded
+               #  with double-quotes.
+               #
+               #  That is to say: User-Name=BobUser => USER_NAME="BobUser"
+               shell_escape = yes
+
+       }
+
+       #  Do server side ip pool management. Should be added in post-auth and
+       #  accounting sections.
+       #
+       #  The module also requires the existance of the Pool-Name
+       #  attribute. That way the administrator can add the Pool-Name
+       #  attribute in the user profiles and use different pools
+       #  for different users. The Pool-Name attribute is a *check* item not
+       #  a reply item.
+       #  The Pool-Name should be set to the ippool module instance name or to
+       #  DEFAULT to much any module.
+       #
+       # Example:
+       # radiusd.conf: ippool students { [...] }
+       #               ippool teachers { [...] }
+       # users file  : DEFAULT Group == students, Pool-Name := "students"
+       #               DEFAULT Group == teachers, Pool-Name := "teachers"
+       #               DEFAULT Group == other, Pool-Name := "DEFAULT"
+       #
+       # ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
+       # ********* THEN ERASE THE DB FILES                     *********
+       #
+       ippool main_pool {
+
+               #  range-start,range-stop: The start and end ip
+               #  addresses for the ip pool
+               range-start = 192.168.1.1
+               range-stop = 192.168.3.254
+
+               #  netmask: The network mask used for the ip's
+               netmask = 255.255.255.0
+
+               #  cache-size: The gdbm cache size for the db
+               #  files. Should be equal to the number of ip's
+               #  available in the ip pool
+               cache-size = 800
+
+               # session-db: The main db file used to allocate ip's to clients
+               session-db = ${raddbdir}/db.ippool
+
+               # ip-index: Helper db index file used in multilink
+               ip-index = ${raddbdir}/db.ipindex
+
+               # override: Will this ippool override a Framed-IP-Address already set
+               override = no
+
+               # maximum-timeout: If not zero specifies the maximum time in seconds an
+               # entry may be active. Default: 0
+               maximum-timeout = 0
+       }
+
        # ANSI X9.9 token support.  Not included by default.
        # $INCLUDE  ${confdir}/x99.conf
 
+       #
+       #  Implements Login-Time, Current-Time, and Time-Of-Day
+       #
+       logintime {
+               #
+               #  Don't worry about anything here for now..
+               #
+       }
 }
 
 # Instantiation
@@ -1146,6 +1646,13 @@ modules {
 #
 instantiate {
        #
+       #  Allows the execution of external scripts.
+       #  The entire command line (and output) must fit into 253 bytes.
+       #
+       #  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
+       exec
+
+       #
        #  The expression module doesn't do authorization,
        #  authentication, or accounting.  It only does dynamic
        #  translation, of the form:
@@ -1163,6 +1670,8 @@ instantiate {
        # the check-name attribute before any module which sets
        # it
 #      daily
+       expiration
+       logintime
 }
 
 #  Authorization. First preprocess (hints and huntgroups files),
@@ -1182,69 +1691,113 @@ authorize {
        #  It takes care of processing the 'raddb/hints' and the
        #  'raddb/huntgroups' files.
        #
-       #  It also adds a Client-IP-Address attribute to the request.
+       #  It also adds the %{Client-IP-Address} attribute to the request.
        preprocess
+
+       #
+       #  If you want to have a log of authentication requests,
+       #  un-comment the following line, and the 'detail auth_log'
+       #  section, above.
+#      auth_log
        
+#      attr_filter
+
        #
        #  The chap module will set 'Auth-Type := CHAP' if we are
        #  handling a CHAP request and Auth-Type has not already been set
        chap
 
-#      attr_filter
+       #
+       #  If the users are logging in with an MS-CHAP-Challenge
+       #  attribute for authentication, the mschap module will find
+       #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
+       #  to the request, which will cause the server to then use
+       #  the mschap module for authentication.
+       mschap
 
        #
-       #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
-       #  authentication.
-       eap
+       #  If you have a Cisco SIP server authenticating against
+       #  FreeRADIUS, uncomment the following line, and the 'digest'
+       #  line in the 'authenticate' section.
+#      digest
 
        #
        #  Look for IPASS style 'realm/', and if not found, look for
        #  '@realm', and decide whether or not to proxy, based on
        #  that.
-#      realmslash
+#      IPASS
+
+       #
+       #  If you are using multiple kinds of realms, you probably
+       #  want to set "ignore_null = yes" for all of them.
+       #  Otherwise, when the first style of realm doesn't match,
+       #  the other styles won't be checked.
+       #
        suffix
+#      ntdomain
+
+       #
+       #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
+       #  authentication.
+       #
+       #  It also sets the EAP-Type attribute in the request
+       #  attribute list to the EAP type from the packet.
+       eap
 
        #
        #  Read the 'users' file
        files
 
        #
+       #  Look in an SQL database.  The schema of the database
+       #  is meant to mirror the "users" file.
+       #
+       #  See "Authorization Queries" in sql.conf
+#      sql
+
+       #
        #  If you are using /etc/smbpasswd, and are also doing
        #  mschap authentication, the un-comment this line, and
        #  configure the 'etc_smbpasswd' module, above.
 #      etc_smbpasswd
 
        #
-       #  If the users are logging in with an MS-CHAP-Challenge
-       #  attribute for authentication, the mschap module will find
-       #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
-       #  to the request, which will cause the server to then use
-       #  the mschap module for authentication.
-       mschap
-
-
-# The ldap module will set Auth-Type to LDAP if it has not already been set
+       #  The ldap module will set Auth-Type to LDAP if it has not
+       #  already been set
 #      ldap
+
+       #
+       #  Enforce daily limits on time spent logged in.
 #      daily
+
+       #
+       # Use the checkval module
+#      checkval
+
+       expiration
+       logintime
 }
 
 
-# Authentication.
+#  Authentication.
+#
 #
 #  This section lists which modules are available for authentication.
 #  Note that it does NOT mean 'try each module in order'.  It means
-#  that you have to have a module from the 'authorize' section add
-#  a configuration attribute 'Auth-Type := FOO'.  That authentication type
-#  is then used to pick the apropriate module from the list below.
-#
-#  The default Auth-Type is Local.  That is, whatever is not included inside
-# an authtype section will be called only if Auth-Type is set to Local.
-#
-# So you should do the following:
-# - Set Auth-Type to an appropriate value in the authorize modules above.
-#   For example, the chap module will set Auth-Type to CHAP, ldap to LDAP, etc.
-# - After that create corresponding authtype sections in the
-#   authenticate section below and call the appropriate modules.
+#  that a module from the 'authorize' section adds a configuration
+#  attribute 'Auth-Type := FOO'.  That authentication type is then
+#  used to pick the apropriate module from the list below.
+#
+
+#  In general, you SHOULD NOT set the Auth-Type attribute.  The server
+#  will figure it out on its own, and will do the right thing.  The
+#  most common side effect of erroneously setting the Auth-Type
+#  attribute is that one authentication method will work, but the
+#  others will not.
+#
+#  The common reasons to set the Auth-Type attribute by hand
+#  is to either forcibly reject the user, or forcibly accept him.
+#
 authenticate {
        #
        #  PAP authentication, when a back-end database listed
@@ -1270,6 +1823,12 @@ authenticate {
        }
 
        #
+       #  If you have a Cisco SIP server authenticating against
+       #  FreeRADIUS, uncomment the following line, and the 'digest'
+       #  line in the 'authorize' section.
+#      digest
+
+       #
        #  Pluggable Authentication Modules.
 #      pam
 
@@ -1282,11 +1841,14 @@ authenticate {
        unix
 
        # Uncomment it if you want to use ldap for authentication
+       #
+       # Note that this means "check plain-text password against
+       # the ldap database", which means that EAP won't work,
+       # as it does not supply a plain-text password.
 #      Auth-Type LDAP {
 #              ldap
 #      }
 
-
        #
        #  Allow EAP authentication.
        eap
@@ -1300,14 +1862,20 @@ preacct {
        preprocess
 
        #
+       #  Ensure that we have a semi-unique identifier for every
+       #  request, and many NAS boxes are broken.
+       acct_unique
+
+       #
        #  Look for IPASS-style 'realm/', and if not found, look for
        #  '@realm', and decide whether or not to proxy, based on
        #  that.
        #
        #  Accounting requests are generally proxied to the same
        #  home server as authentication requests.
-#      realmslash
+#      IPASS
        suffix
+#      ntdomain
 
        #
        #  Read the 'acct_users' file
@@ -1319,26 +1887,38 @@ preacct {
 #
 accounting {
        #
-       #  Ensure that we have a semi-unique identifier for every
-       #  request, and many NAS boxes are broken.
-       acct_unique
-
-       #
        #  Create a 'detail'ed log of the packets.
        #  Note that accounting requests which are proxied
        #  are also logged in the detail file.
        detail
 #      daily
 
-       unix            # wtmp file
+       #  Update the wtmp file
+       #
+       #  If you don't use "radlast", you can delete this line.
+       unix
 
        #
        #  For Simultaneous-Use tracking.
        #
        #  Due to packet losses in the network, the data here
-       #  may be incorrect.  There's little we can do about it.
+       #  may be incorrect.  There is little we can do about it.
        radutmp
 #      sradutmp
+
+       #  Return an address to the IP Pool when we see a stop record.
+#      main_pool
+
+       #
+       #  Log traffic to an SQL database.
+       #
+       #  See "Accounting queries" in sql.conf
+#      sql
+
+
+       #  Cisco VoIP specific bulk accounting
+#      pgsql-voip
+
 }
 
 
@@ -1347,6 +1927,9 @@ accounting {
 #  The rlm_sql module is *much* faster
 session {
        radutmp
+
+       #
+       #  See "Simultaneous Use Checking Querie" in sql.conf
 #      sql
 }
 
@@ -1355,8 +1938,38 @@ session {
 #  Once we KNOW that the user has been authenticated, there are
 #  additional steps we can take.
 post-auth {
-         #  Get an address from the IP Pool.
-         #main_pool
+       #  Get an address from the IP Pool.
+#      main_pool
+
+       #
+       #  If you want to have a log of authentication replies,
+       #  un-comment the following line, and the 'detail reply_log'
+       #  section, above.
+#      reply_log
+
+       #
+       #  After authenticating the user, do another SQL qeury.
+       #
+       #  See "Authentication Logging Queries" in sql.conf
+#      sql
+
+       #
+       #  Un-comment the following if you have set
+       #  'edir_account_policy_check = yes' in the ldap module sub-section of
+       #  the 'modules' section.
+       #
+#      ldap
+       #
+       #  Access-Reject packets are sent through the REJECT sub-section of the
+       #  post-auth section.
+       #  Uncomment the following and set the module name to the ldap instance
+       #  name if you have set 'edir_account_policy_check = yes' in the ldap
+       #  module sub-section of the 'modules' section.
+       #
+#      Post-Auth-Type REJECT {
+#              insert-module-name-here
+#      }
+
 }
 
 #
@@ -1368,7 +1981,12 @@ post-auth {
 #  Only a few modules currently have this method.
 #
 pre-proxy {
-       # attr_rewrite
+#      attr_rewrite
+
+       #  If you want to have a log of packets proxied to a home
+       #  server, un-comment the following line, and the
+       #  'detail pre_proxy_log' section, above.
+#      pre_proxy_log
 }
 
 #
@@ -1377,10 +1995,22 @@ pre-proxy {
 #  post-proxy stage.
 #
 post-proxy {
-       # attr_rewrite
+       #
+
+       #  If you want to have a log of replies from a home server,
+       #  un-comment the following line, and the 'detail post_proxy_log'
+       #  section, above.
+#      post_proxy_log
+
+#      attr_rewrite
+
+       #  Uncomment the following line if you want to filter replies from
+       #  remote proxies based on the rules defined in the 'attrs' file.
+
+#      attr_filter
 
        #
-       #  If you are proxing LEAP, you MUST configure the EAP
+       #  If you are proxying LEAP, you MUST configure the EAP
        #  module, and you MUST list it here, in the post-proxy
        #  stage.
        #