add quote to User-Name

Alan DeKok aland at deployingradius.com
Sun May 7 00:53:14 CEST 2017


On May 6, 2017, at 3:27 PM, Dudás Péter <peter.pdudas at gmail.com> wrote:=
> 
> It is a way too complicated for the first sight.

 It shouldn't be too complicated.

> It is Windows based FreeRadius (2.2.10).

  Which isn't supported.  To be honest, if you got a Windows binary from somewhere, they're likely violating our license.

> And user names has a space between
> the First and Last Name, so needed to be double quoted otherwise it is
> handled as 2 parameters.
> (according to my knowledge it is not possible to insert a double quote
> between the \" \" sequence which is not deleted by the command interpreter).

  It is, you just have to be careful about it.

  And probably upgrade to v3, which has many other things fixed.

  And, don't have User-Names with spaces in them.  It's almost always a bad idea.

> exec multiotp {
>        wait = yes
>        input_pairs = request
>        output_pairs = reply
>        program = "../../multiotp.exe -base-dir=C:/mutiotp/ -keep-local
> -log -debug \"%{Tmp-String-0}\" \"%{User-Password}\""
>        shell_escape = yes
> }

  That should work.  If it doesn't, upgrade to v3.

> Even if I change the User name to a Tmp_String-0 like this the output is
> always the user name without the double quotes:
> update request {
> Tmp-String-0 := "%{User-Name}"
>        }

  That won't help.  You're just copying the name, not adding quotes.

> This is just an experiment - not so important. The main auth server is
> 3.0.13 - where there is no problem calling the multiotp with user names
> containing space.
> I presume the 4.0 cannot be compiled on windows.

  We've never supported Windows.

  Alan DeKok.




More information about the Freeradius-Users mailing list