Re: simple md5 authentication problems - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: simple md5 authentication problems
Date
Msg-id 20060509191601.GI29652@svana.org
Whole thread Raw
In response to Re: simple md5 authentication problems  ("robert" <robertlazarski@gmail.com>)
List pgsql-general
On Mon, May 08, 2006 at 02:10:02PM -0700, robert wrote:
> 1) Isn't the user 'postgres' pre-configured? Running this seems to
> imply so: 'select datname from pg_database;'
>     datname
> ---------------
>  postgres

This demonstrates a *database* named postgres. Users are in the pg_user
table.

> 2) Is there a way to use this user 'postgres' with a non-root unix
> account _not_ named postgres? I just want _any_ method - md5, ident,
> whatever, that allows access to my db with user 'postgres' from an
> account called myuser1, myuser2, and myuser3. Tomorrow it might be
> myuser4.

Absolutely, though the question is obviously why. It's a superuser
account, you can create more of them if you like with createuser.

If you want to use md5, setup a line in pg_hba.conf for md5 auth from
wherever you're logging in (reload postmaster). For this to work you
might need to ALTER USER postgres WITH PASSWORD 'blah' to set the
password.

If you want to use ident (no password), setup pg_hba.conf for ident
using a mapname. You say "ident mapname" there. Then in pg_ident.conf
setup the mapping for IDENT to PGUSERNAME there. Reload postmaster.

You can use trust if you're desperate.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: pg_dump and grants to PUBLIC
Next
From: "Joe Kramer"
Date:
Subject: Re: pgcrypto sha256/384/512 don't work on Redhat. Please help!