-1

yes i am a newbie.

yes i read and tried all posted solutions.

no i can't get it to work in 1 sequence.

problem: coovachilli radius database: 1 field got the wrong information

i want to find a way to find and replace the faulty field with the correct field running as a seperate program or pasted into one of the existing modules

i use and it works manually

update radacct set username = replace username, 'DEFAULT', '???' ;

but how do i replace the ??? with the value of another field (callingstationid) in the same line

or how to get this in in a perl prog with

mysql -u$user -p$pass $database etc etc  
Daniel Böhmer
  • 14,463
  • 5
  • 36
  • 46
  • 1
    Voted to close because it's really unclear what this is about. Why did you tag it PHP, Perl etc.? It seems it's only about SQL. I don't care to find out because your bad formatting really distracts me. – Daniel Böhmer Jan 21 '15 at 10:30

1 Answers1

0

found some solution:

file /etc/freeradius/sql/mysql/clients.conf. Just replace every occurrence of the string '%{SQL-User-Name}' With this string IF('%{SQL-User-Name}' = 'DEFAULT', '%{Calling-Station-Id}', '%{SQL-User-Name}') That will replace an empty user name with the MAC address of the request.

referring page: http://www.coova.org/node/4314