Back To MAN Pages From BackTrack 5 R1 Master List
The configuration file parser is independent of the server configuration. This means that you can put almost anything into the configuration file. So long as it is properly formatted, the server will start.
When the server parses the configuration file, it looks only for those configurations it understands. Extra configuration items are ignored. This "feature" can be (ab)used in certain interesting ways.
The file consists of configuration items (variable = value pairs), sections, and comments.
name = value
Single and double-quoted strings are permitted:
string1 = "hello world"
string2 = 'hello mom'
section {
...
}
Sections can sometimes have a second name following the first one. The situations where this is legal depend on the context. See the examples and comments in the radiusd.conf file for more information.
section foo {
...
}
# comment
foo = bar # set variable 'foo' to value 'bar'
section { # start of section
...
} # end of section
foo = "blah \
blah \
blah"
will set the value of the variable "foo" to "blah blah blah". Any CR or LF is not turned into a space, but all other whitespace is preserved in the final value.
Variables are referenced by ${variable_name}, as in the following examples.
foo = bar # set variable 'foo' to value 'bar'
who = ${foo} # sets variable 'who' to value of variable 'foo'
my = "${foo} a" # sets variable 'my' to "bar a"
If the variable exists in a section or subsection, it can be referenced as ${section.subsection.variable}. Forward references are not allowed. Relative references are allowed, by pre-pending the name with one or more period.
blogs = ${.foo}
Will set variable blogs to the value of variable foo, from the current section.
blogs = ${..foo}
Will set variable blogs to the value of variable foo, from the section which contains the current section.
blogs = ${modules.detail.detailfile}
Will set variable blogs to the value of variable detailfile, of the detail module, which is in the modules section of the configuration file.
If you would like to republish one of the articles from this site on your webpage or print journal please contact IronGeek.
Copyright 2020, IronGeek