pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: default password for user postgres
Date: Fri, 01 Apr 2011 01:17:57 -0700
Message-ID: <4D958A35.8030501@hogranch.com> (raw)
In-Reply-To: <AANLkTimK=49C+jKc8mKMCwPpUuThXyW3nhOHucHrWEWY@mail.gmail.com>
References: <AANLkTimK=49C+jKc8mKMCwPpUuThXyW3nhOHucHrWEWY@mail.gmail.com>

On 03/31/11 6:50 PM, Raphael Giovanini wrote:
> I`m change the default passwod, and not conect for this user. What the 
> default password?

there is no default password.  on most unix and linux distributions, the 
default authentication mode is set to 'ident' which means a given unix 
user X can only connect as the postgres user X.   initially, the only 
postgres user is 'postgres', so...

(assuming you're on the typical unix/linux system, you didn't say)

     $ sudo -u postgres psql

     postgres=> alter user postgres password 'apassword';
     postgres=> create user yerusername createdb createuser password 
'somepass';
     postgres=> create database yerusername owner yerusername;
     postgres=> \q

     $ ...

now as your regular user 'yerusername' you can connect to postgres, and 
have the privileges to create new users and databases.

That sequence also modified the postgres user's password in case you 
change the default authentication method to md5 (this is set in 
pg_hba.conf, see the documentation for more details)





view thread (2+ messages)

Message-ID: <4D958A35.8030501@hogranch.com>
Permalink:  ../4D958A35.8030501@hogranch.com/
Also on:    postgresql.org/message-id/4D958A35.8030501@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pierce@hogranch.com
  Subject: Re: default password for user postgres
  In-Reply-To: <4D958A35.8030501@hogranch.com>
  References: <AANLkTimK=49C+jKc8mKMCwPpUuThXyW3nhOHucHrWEWY@mail.gmail.com> <4D958A35.8030501@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox