Re: What is default password for user postgres

From: Thom Brown <thom(at)linux(dot)com>
To: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What is default password for user postgres
Date: 2014-12-01 10:30:43
Message-ID: CAA-aLv6+F1XYXtOST0MMf21qs7QYRdW_R0qg+h4E3c+riZVPOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1 December 2014 at 09:08, M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com
> wrote:

> Hi all,
>
>
>
> I installed version 9.1 in my Ubuntu OS, but not able to login.
>
> What is default password for user Postgres?
>

The postgres user doesn't have a password by default, which is probably how
you should keep it. Typically the pg_hba.conf file (which you'll find in
/etc/postgresql/9.1/main/pg_hba.conf) contains an entry like:

local all all trust

So reading from left to right, this allows local connections to all
databases for all users using trust authentication, meaning it will believe
you're the postgres user if you say you are, and can be trusted, as long as
you're connecting over a local connection (i.e. using a unix domain
socket). So become the postgres user:

sudo su - postgres

and then you should just be able to connect to the database without any
issues:

postgres(at)swift:~$ psql postgres postgres
psql (9.3.1)
Type "help" for help.

Regards

Thom

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eduardo Morras 2014-12-01 11:37:51 Re: Ever increasing pg_clog disk usage v8.4
Previous Message Albe Laurenz 2014-12-01 09:21:05 Re: Is "WITH () UPDATE" Thread Safe ?