Userauth and hosting

Started by Svenne Krapover 24 years ago1 messagesgeneral
Jump to latest
#1Svenne Krap
usenet@krap.dk

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
--
Mail usenet@krap.dk - svenne@krap.dk - PGP key id : 0xDF484022
ICQ: 5434480 - http://www.krap.dk - http://www.krap.net
PGP Key http://keys.pgp.dk:11371/pks/lookup?op=get&amp;search=0xDF484022