Hi all, I am having trouble with macro substitution in Exec-Program-Wait attribute. For some reason %C{User-Name} is expanded to "localhost{User-Name}" string instead of real user name. Here is an excerpt from the users config file: jsullivan User-Password == mypass Exec-Program-Wait = "/bin/radius_chain %C{User-Name}" where /bin/radius_chain simply dumps the first parameter to the file: #!/bin/sh param=$1 echo "param=$param" > /bin/test/test.txt exit 0 The content of the /bin/test/test.txt is param=localhost{User-Name} instead of expected param=jsullivan Any ideas what is going on? I am using FreeRadius Version 1.1.6 on linux Thanks, Mike
Michael Alexeev wrote:
Hi all,
I am having trouble with macro substitution in Exec-Program-Wait attribute. For some reason %C{User-Name} is expanded to "localhost{User-Name}" string instead of real user name.
Because %C is documented as being the client name. What led you to believe %C{User-Name} would be the user name? The documentation says it's %{User-Name}. Where did the extra 'C' come from"? Alan DeKok.
What led you to believe %C{User-Name} would be the user name? The documentation says it's %{User-Name}. Where did the extra 'C' come from"?
I found it on the following site: http://ftp.wayne.edu/pub/gnu/Manuals/radius-0.95/html_node/radius_182.html <quote> Example Suppose the `users' file contains the following entry: DEFAULT Auth-Type = System, Simultaneous-Use = 1 Exec-Program-Wait = "/usr/local/sbin/telauth \ %C{User-Name} \ %C{Calling-Station-Id}" Then, upon successful matching, the program `/usr/local/sbin/telauth' will be executed. It will get as its arguments the values of User-Name and Calling-Station-Id attributes from the request pairs. <end of quote> Anyway, after removing the extra 'C' evrything works like fine. Thanks for the help. Mike
On Mon 25 Jun 2007, Michael Alexeev wrote:
What led you to believe %C{User-Name} would be the user name? The documentation says it's %{User-Name}. Where did the extra 'C' come from"?
I found it on the following site: http://ftp.wayne.edu/pub/gnu/Manuals/radius-0.95/html_node/radius_182.html
Which, if you read the title is the "GNU Radius Manual", not the "FreeRADIUS Manual". You will probably have better luck if you read docs for the software you are using ;-) Cheers -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc
Michael Alexeev wrote:
I found it on the following site: http://ftp.wayne.edu/pub/gnu/Manuals/radius-0.95/html_node/radius_182.html
Which is the manual for the GNU radius server. There was never a 0.95 release of FreeRADIUS. Alan DeKok.
participants (3)
-
Alan DeKok -
Michael Alexeev -
Peter Nixon