Reply-Message

Neville nev at itsnev.co.uk
Sun Jan 17 17:04:07 CET 2010


Thanks, this works a treat and its just what I needed.

Is there anyway to strip the "\r\n" at the start and end of the 
Reply-Message before writing the TABLE, as it ends up in the tables as:-

"=0D=0AYou are already logged in - access denied=0D=0A=0A"

Thx
Nev
> hi,
> configure postauth_query in dialup.conf,
>
> postauth_query="UPDATE POSTREPLY SET REPLYMESSAGE='%{reply:Reply-Message}' 
> WHERE USERNAME='%{SQL-User-Name}' "
>
> than , you can query the message from DB SERVER.
>
> BTW:
> if reject user, then  ...
>
>        #
>        #  Access-Reject packets are sent through the REJECT sub-section of 
> the
>        #  post-auth section.
>        #
>        #
>        Post-Auth-Type REJECT {
> %{sql:UPDATE POSTREPLY SET REPLYMESSAGE='%{reply:Reply-Message}' WHERE 
> USERNAME='%{SQL-User-Name}' }
> }
>
>>Message: 1
>>Date: Sat, 16 Jan 2010 20:55:45 -0000
>>From: "Neville" <nev at itsnev.co.uk>
>>Subject: Reply-Message
>>To: <freeradius-users at lists.freeradius.org>
>>Message-ID: <1C54F0ABDAFE4EF7B9F3F9D4EC3EFBAC at NevPC>
>>Content-Type: text/plain; charset="iso-8859-1"
>>
>>Hi,
>>
>>Is there any way to get the reply message loaded into a SQL TABLE, which a 
>>user can then query on to see the last reply based on there username?
>>
>>Thx
>>Nev
>>-------------- next part --------------
>>An HTML attachment was scrubbed...
>>URL: 
>><https://lists.freeradius.org/pipermail/freeradius-users/attachments/20100116/14c5b8db/attachment.html>
>>
>>------------------------------
>>
>>Message: 2
>>Date: Sat, 16 Jan 2010 13:15:58 -0800
>>From: "Tim Sylvester" <tim.sylvester at networkradius.com>
>>Subject: RE: Reply-Message
>>To: "'FreeRadius users mailing list'"
>> <freeradius-users at lists.freeradius.org>
>>Message-ID: <4b522c99.101abc0a.1166.ffff9076 at mx.google.com>
>>Content-Type: text/plain; charset="us-ascii"
>>
>>You can put an entry for the Reply-Message attribute in the radreply 
>>table.
>>For example, if you want to send the message "Hi Bob" to user bob, you 
>>would
>>add this entry to radreply:
>>
>>
>>
>>username            attribute                             op 
>>value
>>
>>"bob"                   "Reply-Message"             ":="        "Hi Bob"
>>
>>
>>
>>The Reply-Message attribute will be sent back in the Access-Accept packet
>>sent back to the NAS. Of course, this assumes that you have FreeRADIUS
>>configured to use SQL, which is documented in the raddb/sql.conf file and
>>http://wiki.freeradius.org/SQL_HOWTO.
>>
>>
>>
>>Tim
>>
>>
>
> 




More information about the Freeradius-Users mailing list