Search Postgresql Archives

Re: simple md5 authentication problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux