SER module postgres

You may have to recompile (open)SER to get the module.

make include_modules="postgres"

A minimal postgresql setup:

$ createdb ser
$ psql -U postgres ser
ser=# CREATE TABLE subscriber (
username varchar(32),
domain varchar(32),
password varchar(16),
PRIMARY KEY (username, domain)
ser=# create user ser with password 'mypass';
ser=# grant all on table subscriber to ser;

and to add users manually

ser=# insert into subscriber values ('user', 'domain_or_realm', 'pass');

make sure these are in ser.cfg

loadmodule "/usr/lib/ser/modules/"
loadmodule "/usr/lib/ser/modules/"
loadmodule "/usr/lib/ser/modules/"
loadmodule "/usr/lib/ser/modules/"
modparam("usrloc", "db_mode", 0) # not using postgresql for usrloc database, in memory only
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("auth_db","db_url", "sql://ser:mypass@localhost:5432/ser")

Please note that later versions (=> 0.9.x) of SER require a change to the db_url:

modparam("auth_db","db_url", "postgres://ser:mypass@localhost:5432/ser")

mailing list posts with more information:

SER admin guide
auth_db README

Created by: stan, Last modification: Sat 19 of Nov, 2005 (21:19 UTC) by bmacleod
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+