Ubuntu installed postgresql password failure

Поиск
Список
Период
Сортировка
Искать

Ubuntu installed postgresql password failure

От:
Dale Seaburg <kg5lt@verizon.net>
Дата:
I have reached my wit's end.  lol  I installed postgresql (9.3.9) and 
pgadmin3 with the Ubuntu Software Center.  When using pgadmin or psql, I 
get an error "password authentication failed for user "postgres" ".  
Ubuntu (14.04.3).

I created a postgres user BEFORE installing postgresql/pgadmin toolset.  
The password I used for the postgres user will not work with the 
installed postgresql tools.

What in the world am I doing wrong, and more importantly, how do I 
determine the password used for postgres during the postgresql install?  
AND, why should it be different from the postgres user I created.

Any help will be greatly appreciated.

Dale

Re: Ubuntu installed postgresql password failure

От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 09/13/2015 01:57 PM, Dale Seaburg wrote:
> I have reached my wit's end.  lol  I installed postgresql (9.3.9) and
> pgadmin3 with the Ubuntu Software Center.  When using pgadmin or psql, I
> get an error "password authentication failed for user "postgres" ".
> Ubuntu (14.04.3).
>
> I created a postgres user BEFORE installing postgresql/pgadmin toolset.
> The password I used for the postgres user will not work with the
> installed postgresql tools.

I going to assume you mean you created a system user postgres with 
password. That is not the same as the database user postgres, so the 
password will not be valid.

What does your pg_hba.conf file show for the install?

>
> What in the world am I doing wrong, and more importantly, how do I
> determine the password used for postgres during the postgresql install?
> AND, why should it be different from the postgres user I created.
>
> Any help will be greatly appreciated.
>
> Dale
>
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com

Re: Ubuntu installed postgresql password failure

От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 09/13/2015 01:57 PM, Dale Seaburg wrote:
> I have reached my wit's end.  lol  I installed postgresql (9.3.9) and
> pgadmin3 with the Ubuntu Software Center.  When using pgadmin or psql, I
> get an error "password authentication failed for user "postgres" ".
> Ubuntu (14.04.3).
>
> I created a postgres user BEFORE installing postgresql/pgadmin toolset.
> The password I used for the postgres user will not work with the
> installed postgresql tools.
>
> What in the world am I doing wrong, and more importantly, how do I
> determine the password used for postgres during the postgresql install?
> AND, why should it be different from the postgres user I created.
>
> Any help will be greatly appreciated.

Realized I should have sent the link below previously:

https://help.ubuntu.com/community/PostgreSQL

>
> Dale
>
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com

Re: Ubuntu installed postgresql password failure

От:
Jan de Visser <jan@de-visser.net>
Дата:
On September 13, 2015 03:57:51 PM Dale Seaburg wrote:
> I have reached my wit's end.  lol  I installed postgresql (9.3.9) and
> pgadmin3 with the Ubuntu Software Center.  When using pgadmin or psql, I
> get an error "password authentication failed for user "postgres" ".
> Ubuntu (14.04.3).
> 
> I created a postgres user BEFORE installing postgresql/pgadmin toolset.
> The password I used for the postgres user will not work with the
> installed postgresql tools.
> 
> What in the world am I doing wrong, and more importantly, how do I
> determine the password used for postgres during the postgresql install?
> AND, why should it be different from the postgres user I created.

Try

jan@bison:~$ sudo -u postgres -s
postgres@bison:~$ psql
psql (9.4.4)
Type "help" for help.

postgres=# ALTER USER postgres PASSWORD 'postgres';
ALTER ROLE
postgres=# \q
postgres@bison:~$ exit
jan@bison:~$ 

> 
> Any help will be greatly appreciated.
> 
> Dale


Re: Ubuntu installed postgresql password failure

От:
John R Pierce <pierce@hogranch.com>
Дата:
On 9/13/2015 1:57 PM, Dale Seaburg wrote:
> I have reached my wit's end.  lol  I installed postgresql (9.3.9) and 
> pgadmin3 with the Ubuntu Software Center.  When using pgadmin or psql, 
> I get an error "password authentication failed for user "postgres" ".  
> Ubuntu (14.04.3).
>
> I created a postgres user BEFORE installing postgresql/pgadmin 
> toolset.  The password I used for the postgres user will not work with 
> the installed postgresql tools.
>
> What in the world am I doing wrong, and more importantly, how do I 
> determine the password used for postgres during the postgresql 
> install?  AND, why should it be different from the postgres user I 
> created.
>
> Any help will be greatly appreciated. 

try `su - postgres`   THEN run psql

if that works, do this at that psql prompt:

     CREATE USER yourname SUPERUSER PASSWORD 'somepassword';
     CREATE DATABASE yourname OWNER yourname;

where yourname is your regular login.    now exit psql, exit the su, and 
try running pgadmin.   don't specify localhost, leave the host 
empty/blank, and you should be allowed to log in as yourname.

explaining why this is just as it is requires more energy than I have at 
the moment.




-- 
john r pierce, recycling bits in santa cruz


Re: Ubuntu installed postgresql password failure

От:
Martín Marqués <martin@2ndquadrant.com>
Дата:
El 13/09/15 a las 18:20, Jan de Visser escribió:
> 
> Try
> 
> jan@bison:~$ sudo -u postgres -s
> postgres@bison:~$ psql
> psql (9.4.4)
> Type "help" for help.
> 
> postgres=# ALTER USER postgres PASSWORD 'postgres';
> ALTER ROLE
> postgres=# \q

I would recommend using psql's \password meta-command instead of ALTER
USER to change a password, as to avoid having the password stamped in
the logs.

Regards,

-- 
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Re: Ubuntu installed postgresql password failure

От:
Jan de Visser <jan@de-visser.net>
Дата:

On September 14, 2015 07:22:58 AM Martín Marqués wrote:

> I would recommend using psql's \password meta-command instead of ALTER

> USER to change a password, as to avoid having the password stamped in

> the logs.

 

You learn something new every day :-)

 

jan

Re: Ubuntu installed postgresql password failure

От:
Jan de Visser <jhdeviss@uwaterloo.ca>
Дата:

On September 14, 2015 07:22:58 AM Martín Marqués wrote:

> I would recommend using psql's \password meta-command instead of ALTER

> USER to change a password, as to avoid having the password stamped in

> the logs.

 

You learn something new every day :-)

 

jan

FAQ