> Hi, > > I have setup radius with mysql authentication and exec-program-wait for > authorization. > > Some examples of what the script does: > > If the user's account is ok, I output: > Reply-Message = "Your account is valid until xx/xx/xx." > Session-Timeout = 3600 > > If the user's has no more amount on his account, I output: > Reply-Message = "You have no amount left on your account." > and stop the script with exit code 1 > > If the user's account has expired, I output: > Reply-Message = "Your account has expired." > and stop the script with exit code 1 > > Now, when the script exits with code 1, freeradius sends an Auth-Reject > packet with the message "authentication failed (by external program)" > instead of the Reply-Message attribute. > > I tried with exiting with code 0 and Auth-Type = Reject, but then the login > is accepted instead of rejected. > > I just want the script to be able to reject a user while sending a proper > reply-message why he has been rejected.
See this script example in PHP : <? ... If( check == 'BAD' ): echo "Reply-Message = \"You can not connect....\""; exit(1); Else: // every is OK Exit(0); EndIf; ... ?> Remember that windows users can't see any message returned from radius Sergio Jose Ferreira WGO Intenet Catalao - Go - Brazil - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html