Re: Does the initial postgres user have a password?

From: "dandl" <david(at)andl(dot)org>
To: "'Albe Laurenz'" <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "'Postgres General'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does the initial postgres user have a password?
Date: 2016-05-03 14:32:04
Message-ID: 004101d1a548$9217d9c0$b6478d40$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of Albe Laurenz

> > What is going on here? Is there a password for user ‘postgres’ or
> > isn’t there? What is it? Why don’t I need it sometimes, and I do other
> times?
>
> You have a password set, and it is probably in a password file, which might
> have been created by pgAdmin III.

Half right.

> See http://www.postgresql.org/docs/current/static/libpq-pgpass.html

Mostly right. Thanks -- another part of the docs I've never found before.

Turns out that the superuser account does indeed have a password (how else would I have got past that annoying prompt during installation?) and the installer created a file in one of the strange Windows user data folders (not exactly the one listed in the docs, but close). Both pgadmin and psql know how to find that file, but other tools don't. Hence the inconsistency.

Editing the pg_hba.conf (the usual recommendation) was never the right thing to do here. Finding that little password file was the trick.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-05-03 15:30:59 Re: Field size become unlimited in union...
Previous Message David G. Johnston 2016-05-03 14:23:19 Re: Field size become unlimited in union...