I'd like to have a %{Realm} variable for use in my ldap configuration:
e.g.:
basedn = "ou=%{Realm},dc=example,dc=com"
AFAIUI this variable is not available and I have to create it myself. I
succeeded to run a shell-script that outputs the realm on stdout when a
user authenticates. But I can't get it clear from the doc how to put
this output in %{Realm}. According to the docs I have to have a line
like this:
Attribute-Name = `{%exec:/path/to/program args}`
So I should have something like this:
Realm = `{%exec:/usr/local/scripts/realmgrep}`
But where do I have to put this line? If I put this line in the
instanciate or authorize, radiusd complains:
Cannot find a configuration entry for module "Realm"
so I think this line has to be put somewhere else. I tried the ldap
configuration section, but without success.
Does someone have an example? I looked at the "echo" example in
radius.conf, but I just don't see how this works. I'm new to FR as
you can notice.
Richard.
exec realmgrep {
wait = yes
program = "/usr/local/scripts/realmgrep"
input_pairs = request
output_pairs = request
}
authorize {
preprocess
realmgrep
ldap
}
--
___________________________________________________________________
Recursion: see recursion
+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
--
___________________________________________________________________
Recursion: see recursion
+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
00000000.mimetmp
Description: PGP signature

