pre-check OTP token

Fajar A. Nugraha list at
Mon Jul 4 12:22:41 CEST 2011

On Mon, Jul 4, 2011 at 4:57 PM, Cor Bosman <cor at> wrote:
> Would their be some way, in either the PAM stage, or in the FreeRadius stage before Exec to pre-validate if ive got a token-reponse? They're always 10 digit numbers.

Are you asking for a "cheap" way to validate whether User-Password has
10 digit numbers? If yes, just use unlang. Sometihing like this on
authorize section (this works only if you use PAP)

        if (!("%{request:User-Password}" =~ /^[0-9]{10,10}$/)) {
                update control {
                        Auth-Type := Reject


More information about the Freeradius-Users mailing list