userauth and hosting

From: "Svenne Krap" <usenet(at)krap(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: userauth and hosting
Date: 2001-11-15 18:57:24
Message-ID: 3BF41E24.14351.8B7BCA@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm about to setup an automated system for creating hosting with
database access (PGSQL).

My current approach look like this (everything from here is done
from
a cronjob program with root-privileges data sucked from a database)
:

I have defined a password for postgres in the database.

<file made from cronjob started from shell like "psql -U postgres <
commandfile">
password-4-postgres-user
create database testdb
create user testuser with password 'testpassword'
</file>

<section added to ~postgres/pg_hba.conf>
local testdb password access.test
host testdb 0.0.0.0 0.0.0.0 password access.test
</section>

<file access.test located in ~postgres>
testuser
</file>

Finally execute "killall -HUP postmaster"

And will this work in the upcoming 7.2.x-series ?

Is that totally wrong, or is there more intelligent ways to do it ?

Svenne--
svenne(at)krap(dot)dk (ICQ 5434480)
PGP-publickey @ http://intra.krap.dk/pgp.php

Browse pgsql-general by date

  From Date Subject
Next Message Andrew G. Hammond 2001-11-15 19:13:43 Re: Modifying check constraints
Previous Message Geoffrey J. Gowey 2001-11-15 18:35:30 Re: returning more than one value from pgsql