On Mon, Jul 11, 2005 at 05:56:43PM +0200, Tom wrote:

> Quite some lines like
> 
> FATAL:  user "tom" does not exist
> FATAL:  database "cds" does not exist
> FATAL:  user "root" does not exist
> FATAL:  user "root" does not exist
> FATAL:  user "tom" does not exist
> FATAL:  Ident authentication failed for user "postgres"

etc.

You can save yourself some trouble screwing around w/ the 'postgres'
user account by creating an ident map which relates the shell account
you normally use with the postgres user.

Edit pg_ident.conf to look something like:

mymap         yourusername      postgres
mymap         postgres          postgres
mymap         root              postgres

Then edit pg_hba.conf to look something like:

local all all ident mymap

This says that when connecting to any local database as any user, do
ident authentication, and refer to the 'mymap' entries in pg_ident.conf
for doing the lookups.  So now, logged in as yourusername or root, for
example, you can do:

psql -U postgres -d template1

-- 
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to