FR3.0.1Problems with raddebug and radmin.

Palmer J.D.F. J.D.F.Palmer at swansea.ac.uk
Thu Feb 27 12:56:09 CET 2014


> Subject: Re: FR3.0.1Problems with raddebug and radmin.
> 
> Hi,
> 
> >    I've tried a few different formats for my conditions, all to no avail.
> 
> the man page gives the way:
> 
> debug condition ’(User-Name == "bob")’

Ok, that is working within radmin.

But I'm still struggling with raddebug.
It looks like the condition is having an issue escaping the "'s which have been introduced in FR3*

If I start raddebug like as below it works.

raddebug -c '(User-Name == \"bob\")'

I've added a line to raddebug to echo the OPTARG variable.
Here's the output for various attempts...

[root at radauth3 freeradius-server-3.0.1]# raddebug -c '(User-Name == \"bob at bobville\")'
(User-Name == \"bob at bobville\")

^^The above works.

These below all fail...

[root at radauth3 freeradius-server-3.0.1]raddebug -c '(User-Name == "bob at bobville")'
(User-Name == "bob at bobville")

[root at radauth3 freeradius-server-3.0.1]# raddebug -u bob at bobville
bob at bobville

[root at radauth3 freeradius-server-3.0.1]# raddebug -u "bob at bobville"
bob at bobville

[root at radauth3 freeradius-server-3.0.1]# raddebug -u \"bob at bobville\"
"bob at bobville"



However, if I hack the raddebug script and change the line...
 u)    condition="(User-Name == $OPTARG )"
to  
 u)    condition="(User-Name == \\\"$OPTARG\\\")"

raddebug -u bob at bobville  works as expected

Cheers,
Jezz.








More information about the Freeradius-Users mailing list