Dear, i have successfully replace the username from a file but it add "\n" or a white space for it, i'm using echo or cat command and the same result, here is the output for the debug, please advice how can i remove it..... modcall: entering group pre-proxy for request 1 radius_xlat: 'wanadoo' radius_xlat: Running registered xlat function of module exec for string '/bin/echo 11111111111111' rlm_exec (exec): Executing /bin/echo 11111111111111 radius_xlat: '/bin/echo 11111111111111' Exec-Program: /bin/echo 11111111111111 Exec-Program output: 11111111111111 Exec-Program-Wait: plaintext: 11111111111111 Exec-Program: returned: 0 rlm_exec (exec): result 0 radius_xlat: '11111111111111 ' rlm_attr_rewrite: Changed value for attribute User-Name from 'wanadoo' to '11111111111111 ' rlm_attr_rewrite: Could not find value pair for attribute User-Name modcall[pre-proxy]: module "fixusername" returns ok for request 1 radius_xlat: '/var/log/radius/radacct/172.16.5.188/pre-proxy-detail-20070206' rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d expands to /var/log/radius/radacct/172.16.5.188/pre-proxy-detail-20070206 modcall[pre-proxy]: module "pre_proxy_log" returns ok for request 1 modcall: group pre-proxy returns ok for request 1 Sending Access-Request of id 1 to 10.3.83.11:1812 User-Name = "11111111111111\n" NAS-IP-Address = 10.0.0.2 Called-Station-Id = "080010101" User-Password = "11111111111111" Proxy-State = 0x31
Ashraf Al-Basti <Ashraf.Albasti@jt.net.jo> writes:
i have successfully replace the username from a file but it add "\n" or a white space for it, i'm using echo or cat command and the same result, here is the output for the debug, please advice how can i remove it.....
echo(1): -n do not output the trailing newline Bjørn
Thanks, but if i want to read from file using cat how to do that? Bjørn Mork wrote:
Ashraf Al-Basti <Ashraf.Albasti@jt.net.jo> writes:
i have successfully replace the username from a file but it add "\n" or a white space for it, i'm using echo or cat command and the same result, here is the output for the debug, please advice how can i remove it.....
echo(1):
-n do not output the trailing newline
Bjørn
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Ashraf Al-Basti <Ashraf.Albasti@jt.net.jo> writes:
Thanks, but if i want to read from file using cat how to do that?
a) don't write the \n to the file in the first place, or b) pipe the output through `tr -d \n`, or c) write a simple script to read the file and preprocess the data as you like before feeding it to freeradius Bjørn
Hi, when i try to use `tr -d \n` it always failed with this error odcall: entering group pre-proxy for request 0 radius_xlat: '/bin/bash /var/www/html/Test 11111111111111' Exec-Program: /bin/bash /var/www/html/Test 11111111111111 Exec-Program output: Exec-Program: returned: 0 modcall[pre-proxy]: module "DB" returns ok for request 0 radius_xlat: 'wanadoo' radius_xlat: Running registered xlat function of module exec for string '/bin/cat /var/www/html/user | tr -d ' rlm_exec (exec): Executing /bin/cat /var/www/html/user | tr -d radius_xlat: '/bin/cat /var/www/html/user | tr -d ' Exec-Program: /bin/cat /var/www/html/user | tr -d /bin/cat: invalid option -- d Try `/bin/cat --help' for more information. Exec-Program output: Exec-Program: returned: 1 rlm_exec (exec): result 1 radius_xlat: '' Bjørn Mork wrote:
Ashraf Al-Basti <Ashraf.Albasti@jt.net.jo> writes:
Thanks, but if i want to read from file using cat how to do that?
a) don't write the \n to the file in the first place, or b) pipe the output through `tr -d \n`, or c) write a simple script to read the file and preprocess the data as you like before feeding it to freeradius
Bjørn
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Ashraf Al-Basti -
Bjørn Mork