Table of Contents

Submit-Postgres

1. Description

Dumps the Captured files to a postgresql database, so you can track how many hits a file gets.

2. Setup

create the poweruser ‘mwcollect’

createuser --createdb --login --createrole --pwprompt mwcollect

adjust his privs in pg_hba.conf

local   all         all                               trust # this is picky if the box is not dedicated
host    all         all         127.0.0.1/32          md5
host    mwcollect   all         0.0.0.0/0             md5

create the database, and load the pgsql interpreter for the database

createdb -U mwcollect mwcollect
createlang plpgsql mwcollect

connect the database

psql -U mwcollect mwcollect

create the roles

CREATE ROLE role_sensor WITH NOCREATEDB NOCREATEROLE NOCREATEUSER INHERIT NOLOGIN CONNECTION LIMIT 10;
CREATE ROLE role_analyzer WITH NOCREATEDB NOCREATEROLE NOCREATEUSER INHERIT NOLOGIN CONNECTION LIMIT 10;
CREATE ROLE role_www WITH NOCREATEDB NOCREATEROLE NOCREATEUSER INHERIT NOLOGIN CONNECTION LIMIT 10;

create the tables from the schema

psql -U mwcollect < schema.sql

create a user

CREATE USER foobar;
ALTER USER foobar PASSWORD 'fxfglsdfa';
INSERT INTO accounts (username) VALUES ('foobar');

grant the user foobar access as a sensor

GRANT role_sensor TO foobar;

Other

OpenBSD

 
documentation/modules/submithandler/submit_postgres.txt · Last modified: 2008/02/18 17:39
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki