PDA

View Full Version : [all variants] Can't find radius sql example files



abasel
October 16th, 2009, 06:42 AM
Following: https://help.ubuntu.com/community/WifiDocs/CoovaChilli

I tried running the following,

zcat /usr/share/doc/freeradius/examples/mysql.sql.gz | mysql -u root -p radius

Only to find that the above mentioned files don't exist. Radius installed fine (apt-get install freeradius freeradius-mysql).

I am using Ubuntu Server 9.

Can someone tell me where I can get these files?

abasel
October 16th, 2009, 09:57 AM
K... found a page (http://www.ibr.cs.tu-bs.de/cgi-bin/dwww?type=file&location=/usr/share/doc/freeradius/examples/db_mysql.sql.gz)

Hopefully this works.

abasel
October 16th, 2009, 10:19 AM
aagh I saved this file and then tried the following:


cat mysql.sql | mysql -u root -p radius

But I get:


ERROR 1067 (42000) at line 155: Invalid default value for 'id'

Which refers to the last entry in the file ie


CREATE TABLE nas (
id int(10) DEFAULT '0' NOT NULL auto_increment,
nasname varchar(128) NOT NULL,
shortname varchar(32),
type varchar(30) DEFAULT 'other',
ports int(5),
secret varchar(60) DEFAULT 'secret' NOT NULL,
community varchar(50),
description varchar(200) DEFAULT 'RADIUS Client',
PRIMARY KEY (id),
KEY nasname (nasname)
);


Any ideas

abasel
October 16th, 2009, 10:25 AM
Think I worked it out... just documenting it for anyone else who did the same as me...

Just worked out from the following:


Note: for freeradius 2

That I am proably using freeradius 2 and there need to use


mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql
mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql


Instead :-)

abean
November 18th, 2009, 06:29 PM
Hey there,

I am also having trouble using freeradius2 and finding a work around for the file. Trouble is I don't have the mysql directory you spcified either... Any more details? Or could you send me the scripts?

Found it...

#sudo apt-get install freeradius-mysql

Then the directories are there :)

abasel
November 18th, 2009, 06:56 PM
Sorry but I only have what is in the link at the top of this thread.