From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: What is default password for user postgres |
Date: | 2014-12-01 14:32:52 |
Message-ID: | 547C7C14.9000207@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 12/01/2014 02:30 AM, Thom Brown wrote:
> On 1 December 2014 at 09:08, M Tarkeshwar Rao
> <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com <mailto: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
Actually my experience is that it is set to:
local all postgres peer
>
> 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:
Also there is only a postgres system user created with no login shell.
From Ubuntu:
https://help.ubuntu.com/community/PostgreSQL
Basic Server Setup
To start off, we need to change the PostgreSQL postgres user password;
we will not be able to access the server otherwise. As the “postgres”
Linux user, we will execute the psql command.
In a terminal, type:
sudo -u postgres psql postgres
Set a password for the "postgres" database role using the command:
\password postgres
and give your password when prompted. The password text will be hidden
from the console for security purposes.
>
> 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
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Vick Khera | 2014-12-01 14:38:57 | Re: Best filesystem for a high load db |
Previous Message | Glyn Astill | 2014-12-01 12:00:28 | Re: Synchronous Replication Timeout |