SQL replacement for clients.conf?

Guy Fraser guy at incentre.net
Fri Sep 16 01:51:48 CEST 2005


On Thu, 2005-15-09 at 15:08 -0400, Alan DeKok wrote:
> > Am I to take it that it is not possible to use SQL for the clients.conf
> > file? And if that it the case could someone please explain what the nas
> > table is for in the database schema?
> 
>   It's possible.  You do need at least one entry in "clients.conf",
> though.  I suggest "127.0.0.1"
> 
>   Then, read "sql.conf", and set "readclients=yes"
> 
>   Alan DeKok.

Cool.

I am working with FreeBSD and the updates for 1.0.5 are not 
in the cvsup repository yet, so my comment is in regards to 
1.0.4, but may apply to 1.0.5.

I to a look at the postgresql stuff and it appears as though 
the schema will need a little tweak in order to be compitible 
with "rlm_sql.c"'s requirements.

A "SERIAL" column named Id will need to be added.

This will make it compatible :

-- SQL clients table
CREATE TABLE nas (
	id		SERIAL PRIMARY KEY,
	nasname		VARCHAR(128),
	shortname	VARCHAR(32) NOT NULL,
	type		VARCHAR(30),
	ports		int4,
	secret		VARCHAR(60) NOT NULL,
	community	VARCHAR(50),
	description	TEXT
);

This is not required, but this info used to be in the nas
table in the postgresql schema.

-- additional nas info table included in previous nas table
CREATE TABLE nas (
	id		int4 NOT NULL,
	ipaddr		INET PRIMARY KEY,
	snmp		VARCHAR(10),
	naslocation	VARCHAR(32)
);







More information about the Freeradius-Users mailing list