Ubuntu installed postgresql password failure

Started by Dale Seaburgover 10 years ago8 messagesgeneral
Jump to latest
#1Dale 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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Dale Seaburg (#1)
Re: Ubuntu installed postgresql password failure

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Dale Seaburg (#1)
Re: Ubuntu installed postgresql password failure

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Jan de Visser
jan@de-visser.net
In reply to: Dale Seaburg (#1)
Re: Ubuntu installed postgresql password failure

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5John R Pierce
pierce@hogranch.com
In reply to: Dale Seaburg (#1)
Re: Ubuntu installed postgresql password failure

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Martín Marqués
martin@2ndquadrant.com
In reply to: Jan de Visser (#4)
Re: Ubuntu installed postgresql password failure

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Jan de Visser
jhdeviss@uwaterloo.ca
In reply to: Martín Marqués (#6)
Re: Ubuntu installed postgresql password failure

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

#8Jan de Visser
jan@de-visser.net
In reply to: Martín Marqués (#6)
Re: Ubuntu installed postgresql password failure

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