Can update sections contain if conditions? I get the following error: /etc/raddb/sites-enabled/default[573]: "update" sections cannot have subsections /etc/raddb/sites-enabled/default[465]: Errors parsing post-auth section. The documentation says "The only contents permitted in an "update" section are attributes and values which I assume is the issue. Please confirm. Bill
Correct. Update sections cannot contain conditional statements. Stefan -----Original Message----- From: freeradius-users-bounces+stefan.paetow=diamond.ac.uk@lists.freeradius.org [mailto:freeradius-users-bounces+stefan.paetow=diamond.ac.uk@lists.freeradius.org] On Behalf Of Bill Schoolfield Sent: 13 June 2013 16:07 To: FreeRadius users mailing list Subject: unlang and update section Can update sections contain if conditions? I get the following error: /etc/raddb/sites-enabled/default[573]: "update" sections cannot have subsections /etc/raddb/sites-enabled/default[465]: Errors parsing post-auth section. The documentation says "The only contents permitted in an "update" section are attributes and values which I assume is the issue. Please confirm. Bill - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
On 13/06/13 16:07, Bill Schoolfield wrote:
Can update sections contain if conditions? I get the following error:
No.
/etc/raddb/sites-enabled/default[573]: "update" sections cannot have subsections /etc/raddb/sites-enabled/default[465]: Errors parsing post-auth section.
The documentation says "The only contents permitted in an "update" section are attributes and values which I assume is the issue. Please confirm.
The documentation is authoritative. It should need to be confirmed.
Thanks all for the confirmation. I guess I'll use the perl module instead. Bill On 6/13/2013 10:30 AM, Phil Mayers wrote:
On 13/06/13 16:26, Phil Mayers wrote:
The documentation is authoritative. It should need to be confirmed.
Shouldn't. Sigh. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Bill Schoolfield wrote:
Can update sections contain if conditions? I get the following error:
/etc/raddb/sites-enabled/default[573]: "update" sections cannot have subsections
What is unclear about that?
/etc/raddb/sites-enabled/default[465]: Errors parsing post-auth section.
The documentation says "The only contents permitted in an "update" section are attributes and values which I assume is the issue. Please confirm.
I can confirm that the error message is correct. I can confirm that the documentation is correct. Now, are you going to ask a useful question? And what did you put in the section starting on line 573? Is it a secret? Alan DeKok.
On 6/13/2013 10:33 AM, Alan DeKok wrote:
Bill Schoolfield wrote:
Can update sections contain if conditions? I get the following error:
/etc/raddb/sites-enabled/default[573]: "update" sections cannot have subsections
What is unclear about that?
/etc/raddb/sites-enabled/default[465]: Errors parsing post-auth section.
The documentation says "The only contents permitted in an "update" section are attributes and values which I assume is the issue. Please confirm.
I can confirm that the error message is correct.
I can confirm that the documentation is correct.
Now, are you going to ask a useful question? And what did you put in the section starting on line 573? Is it a secret?
From my perspective, yes it was useful to me. I didn't know those were line numbers. Now I know. It seems clear in retrospect but I've seen quite a bit of misleading, outdated or wrong documentation (mostly elsewhere but sometimes at freeradius.org) so I thought I'd get confirmation. Any harm in that?
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Bill Schoolfield wrote:
From my perspective, yes it was useful to me. I didn't know those were line numbers. Now I know. It seems clear in retrospect but I've seen quite a bit of misleading, outdated or wrong documentation (mostly elsewhere but sometimes at freeradius.org) so I thought I'd get confirmation. Any harm in that?
Yes. Your message amounted to asking this: "The documentation says you can't do X, and when I try to do it, I get an error. Is that correct?" The harm in these questions is the total waste of everyone's time. This is a free support list. It presumes that people asking questions have put some minor thought into the process. If you're not willing to put a little effort into it, then you should expect to get told you need to put a little effort into it. And no, you don't need to run a Perl script. Instead of putting the "if" inside of an "update" section, you can put it outside of the "update" section. Or even use *two* update sections. Think out of the box. Alan DeKok.
Yes, i have come across this error once. there is little mistake in your unlang code. understand form following working code. ## Authorization Area Starts Here # If user not present allow them free access # Between 10:00 and 12:59PM ('Any1000-1259') # Whole Day ('Any0000-2359') # File Module Retuns "noop" & sql Module Returns "notfound" server accept_everyone { authorize { sql if(ok) { update control { Login-Time := 'Any0000-1259' Auth-Type := "Accept" } } update reply { WISPr-Redirection-URL := "http://www.yale.edu" } else { update control { Auth-Type := "Reject" } update reply { WISPr-Redirection-URL := "http://41.139.28.1" } } } pap files logintime expiration preprocess dailycounter forevertimecounter # Fix ForThe WARNING That Says: Unknown Value Specified For Post-Auth-Type. Cannot Perform Requested Action # # Do Not Remove The "Post-Auth" Configuration From Authorization Section (Here): # post-auth { Post-Auth-Type REJECT { noop notfound } } } authenticate { Auth-Type PAP { pap } Auth-Type CHAP { chap } Auth-Type MS-CHAP { mschap } digest unix eap } # END Thanks --RM On Thu, Jun 13, 2013 at 3:07 PM, Bill Schoolfield <bill@billmax.com> wrote:
Can update sections contain if conditions? I get the following error:
/etc/raddb/sites-enabled/**default[573]: "update" sections cannot have subsections /etc/raddb/sites-enabled/**default[465]: Errors parsing post-auth section.
The documentation says "The only contents permitted in an "update" section are attributes and values which I assume is the issue. Please confirm.
Bill - List info/subscribe/unsubscribe? See http://www.freeradius.org/** list/users.html <http://www.freeradius.org/list/users.html>
participants (5)
-
Alan DeKok -
Bill Schoolfield -
Phil Mayers -
Russell Mike -
stefan.paetow@diamond.ac.uk