Skip site navigation (1) Skip section navigation (2)

Re: default password for user postgres

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: default password for user postgres
Date: 2011-04-01 08:17:57
Message-ID: 4D958A35.8030501@hogranch.com (view raw or flat)
Thread:
Lists: pgsql-bugs
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)



In response to

pgsql-bugs by date

Next:From: SumitDate: 2011-04-01 10:04:49
Subject: BUG #5962: Problem Acessing Network Path
Previous:From: Noah MischDate: 2011-04-01 04:56:29
Subject: Re: BUG #5856: pg_attribute.attinhcount is not correct.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group