Okay, two quick questions. If I set up an exec module in the radiusd.conf file, with the intent of using an external script to authenticate, as follows: exec special_auth { wait = yes program = "/usr/local/freeradius/etc/scripts/rad-auth.sh%{User-Name}" input_pairs = request output_pairs = reply } ........................ in the "instantiate" section I include the following special_auth ........................ Then in the "authenticate" section Auth-Type NEWAUTH { special_auth } Question 1: This script is intended to be an Authentication method. How do I teach freeradius (during the authorize process?) to set Auth-Type to use this method when appropriate? This would mean that freeradius would have to set the Auth-Type to NEWAUTH, right? The NEWAUTH block would in turn kick of the special_auth module and execute my auth script? Question 2: A related, but separate question regarding external scripts. Having specified the "output_pairs = reply" parameter, how does a script set or return the pairs for use by freeradius. I know I'm off base a little because this does not seem to work as yet, any guidance here would be appreciated. Regards, Lin Richardson
"Lin Richardson" <lin@xmission.com> wrote:
Question 1: This script is intended to be an Authentication method. How do I teach freeradius (during the authorize process?) to set Auth-Type to use this method when appropriate?
This is one of the few cases where you have to set Auth-Type yourself, in another module.
This would mean that freeradius would have to set the Auth-Type to NEWAUTH, right? The NEWAUTH block would in turn kick of the special_auth module and execute my auth script?
Yes.
Question 2: A related, but separate question regarding external scripts. Having specified the "output_pairs = reply" parameter, how does a script set or return the pairs for use by freeradius.
See scripts/exec-program-wait Alan DeKok. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
Thanks, Alan. I did make some progress from old replies in the archive, and you have verified/clarified what I thought I had discovered. Should modules in the authorize section only set "output_pairs = config" then? Unless acted upon, all attributes or pairs move "as is" to the successive list, correct? request -> config -> reply Thanks, Lin On 8/10/06, Alan DeKok <aland@deployingradius.com> wrote:
"Lin Richardson" <lin@xmission.com> wrote:
Question 1: This script is intended to be an Authentication method. How do I teach freeradius (during the authorize process?) to set Auth-Type to use this method when appropriate?
This is one of the few cases where you have to set Auth-Type yourself, in another module.
This would mean that freeradius would have to set the Auth-Type to NEWAUTH, right? The NEWAUTH block would in turn kick of the special_auth module and execute my auth script?
Yes.
Question 2: A related, but separate question regarding external scripts. Having specified the "output_pairs = reply" parameter, how does a script set or return the pairs for use by freeradius.
See scripts/exec-program-wait
Alan DeKok.
Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
"Lin Richardson" <lin@xmission.com> wrote:
Should modules in the authorize section only set "output_pairs = config" then?
No. They can set whatever they want.
Unless acted upon, all attributes or pairs move "as is" to the successive list, correct? request -> config -> reply
Absolutely not. Attributes are NEVER moved from one list to another. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
participants (2)
-
Alan DeKok -
Lin Richardson