unlang and update section

Russell Mike radius.sir at gmail.com
Thu Jun 13 17:45:23 CEST 2013


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 at 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130613/699d926c/attachment.html>


More information about the Freeradius-Users mailing list