Thread: Password authentication failing

Password authentication failing

From
Bill Appelbe
Date:
Hi<br />I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which also has PostgreSQL 8.4 installed.<br /><br />It all
workedfine and I was able to look at the database.<br />Then I went away for a few days, came back and now have a
problemconnecting to PostgreSQL<br /> the error is:<br />Error connecting to the server: FATAL:  password
authenticationfailed for user "postgres"<br />FATAL:  password authentication failed for user "postgres"<br /><br
/>Seemssimple enough! but I retype the password and no joy.<br /> I have another application that uses PostgreSQL
(LedgerSMB)and it works fine.<br /><br />After some research I changed the password using :<br />ALTER USER postgres
PASSWORD'newPassword';<br />in psql<br />this also does not work<br /><br />I also edited pg_hba.comf and replaced the
word'ident' with 'trust' in the first line.<br />I restarted the postgres server and still no joy.<br /><br />There has
tobe something simple that I am missing but I can't see it!<br /> any help would be appreciated<br /><br />thanks<br
/><br/>Bill<br /> 

Re: Password authentication failing

From
Guillaume Lelarge
Date:
On Thu, 2011-12-29 at 16:31 +0000, Bill Appelbe wrote:
> Hi
> I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which also has
> PostgreSQL 8.4 installed.
> 
> It all worked fine and I was able to look at the database.
> Then I went away for a few days, came back and now have a problem
> connecting to PostgreSQL
> the error is:
> Error connecting to the server: FATAL:  password authentication failed for
> user "postgres"
> FATAL:  password authentication failed for user "postgres"
> 
> Seems simple enough! but I retype the password and no joy.
> I have another application that uses PostgreSQL (LedgerSMB) and it works
> fine.
> 
> After some research I changed the password using :
> ALTER USER postgres PASSWORD 'newPassword';
> in psql
> this also does not work
> 
> I also edited pg_hba.comf and replaced the word 'ident' with 'trust' in the
> first line.
> I restarted the postgres server and still no joy.
> 
> There has to be something simple that I am missing but I can't see it!
> any help would be appreciated
> 

The only reason I see is that you're not connecting to the same server.


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com PostgreSQL Sessions #3:
http://www.postgresql-sessions.org



Re: Password authentication failing

From
Bill Appelbe
Date:


On Thu, Dec 29, 2011 at 4:47 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Thu, 2011-12-29 at 16:31 +0000, Bill Appelbe wrote:
> Hi
> I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which also has
> PostgreSQL 8.4 installed.
>
> It all worked fine and I was able to look at the database.
> Then I went away for a few days, came back and now have a problem
> connecting to PostgreSQL
> the error is:
> Error connecting to the server: FATAL:  password authentication failed for
> user "postgres"
> FATAL:  password authentication failed for user "postgres"
>
> Seems simple enough! but I retype the password and no joy.
> I have another application that uses PostgreSQL (LedgerSMB) and it works
> fine.
>
> After some research I changed the password using :
> ALTER USER postgres PASSWORD 'newPassword';
> in psql
> this also does not work
>
> I also edited pg_hba.comf and replaced the word 'ident' with 'trust' in the
> first line.
> I restarted the postgres server and still no joy.
>
> There has to be something simple that I am missing but I can't see it!
> any help would be appreciated
>

The only reason I see is that you're not connecting to the same server.


--
Guillaume
 http://blog.guillaume.lelarge.info
 http://www.dalibo.com
 PostgreSQL Sessions #3: http://www.postgresql-sessions.org

 
It is all to 127.0.0.1 there is no other PostgreSQL installation on the network

Bill

Re: Password authentication failing

From
Guillaume Lelarge
Date:
On Thu, 2011-12-29 at 17:00 +0000, Bill Appelbe wrote:
> 
> 
> On Thu, Dec 29, 2011 at 4:47 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>         On Thu, 2011-12-29 at 16:31 +0000, Bill Appelbe wrote:
>         > Hi
>         > I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which
>         also has
>         > PostgreSQL 8.4 installed.
>         >
>         > It all worked fine and I was able to look at the database.
>         > Then I went away for a few days, came back and now have a
>         problem
>         > connecting to PostgreSQL
>         > the error is:
>         > Error connecting to the server: FATAL:  password
>         authentication failed for
>         > user "postgres"
>         > FATAL:  password authentication failed for user "postgres"
>         >
>         > Seems simple enough! but I retype the password and no joy.
>         > I have another application that uses PostgreSQL (LedgerSMB)
>         and it works
>         > fine.
>         >
>         > After some research I changed the password using :
>         > ALTER USER postgres PASSWORD 'newPassword';
>         > in psql
>         > this also does not work
>         >
>         > I also edited pg_hba.comf and replaced the word 'ident' with
>         'trust' in the
>         > first line.
>         > I restarted the postgres server and still no joy.
>         >
>         > There has to be something simple that I am missing but I
>         can't see it!
>         > any help would be appreciated
>         >
>         
>         
>         The only reason I see is that you're not connecting to the
>         same server.
>         
>         
>         --
>         Guillaume
>          http://blog.guillaume.lelarge.info
>          http://www.dalibo.com
>          PostgreSQL Sessions #3: http://www.postgresql-sessions.org
>         
>  
> It is all to 127.0.0.1 there is no other PostgreSQL installation on
> the network
> 

OK. Then, tell us exactly how you try to connect to your PostgreSQL
database, the exact error message you get, and give us the whole
pg_hba.conf file.


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com PostgreSQL Sessions #3:
http://www.postgresql-sessions.org



Re: Password authentication failing

From
Elizondo Julio César
Date:

TRY alter user postgres with password “NNNNNNNN “;

 

Julio Elizondo

 

De: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] En nombre de Bill Appelbe
Enviado el: jueves, 29 de diciembre de 2011 02:01 p.m.
Para: Guillaume Lelarge
CC: pgadmin-support@postgresql.org
Asunto: Re: [pgadmin-support] Password authentication failing

 

 

On Thu, Dec 29, 2011 at 4:47 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:

On Thu, 2011-12-29 at 16:31 +0000, Bill Appelbe wrote:
> Hi
> I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which also has
> PostgreSQL 8.4 installed.
>
> It all worked fine and I was able to look at the database.
> Then I went away for a few days, came back and now have a problem
> connecting to PostgreSQL
> the error is:
> Error connecting to the server: FATAL:  password authentication failed for
> user "postgres"
> FATAL:  password authentication failed for user "postgres"
>
> Seems simple enough! but I retype the password and no joy.
> I have another application that uses PostgreSQL (LedgerSMB) and it works
> fine.
>
> After some research I changed the password using :
> ALTER USER postgres PASSWORD 'newPassword';
> in psql
> this also does not work
>
> I also edited pg_hba.comf and replaced the word 'ident' with 'trust' in the
> first line.
> I restarted the postgres server and still no joy.
>
> There has to be something simple that I am missing but I can't see it!
> any help would be appreciated
>

The only reason I see is that you're not connecting to the same server.


--
Guillaume
 http://blog.guillaume.lelarge.info
 http://www.dalibo.com
 PostgreSQL Sessions #3: http://www.postgresql-sessions.org

 

It is all to 127.0.0.1 there is no other PostgreSQL installation on the network

Bill



Este correo electrónico puede contener información confidencial y protegida legalmente bajo secreto profesional y/o financiero. La información esta dirigida solamente a la persona o entidad indicada como destinatario y su acceso por cualquier otra persona no esta autorizado.
Si ud. ha recibido este mensaje electrónico por error, por favor infórmeselo al remitente y bórrelo. Los conceptos y opiniones contenidos en este mail corresponden al autor del mensaje y no necesariamente coinciden con las de Distribuidora de Gas Cuyana S.A.

Muchas Gracias.
Distribuidora de Gas Cuyana S.A.

Re: Password authentication failing

From
Bill Appelbe
Date:


On Thu, Dec 29, 2011 at 5:04 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Thu, 2011-12-29 at 17:00 +0000, Bill Appelbe wrote:
>
>
> On Thu, Dec 29, 2011 at 4:47 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>         On Thu, 2011-12-29 at 16:31 +0000, Bill Appelbe wrote:
>         > Hi
>         > I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which
>         also has
>         > PostgreSQL 8.4 installed.
>         >
>         > It all worked fine and I was able to look at the database.
>         > Then I went away for a few days, came back and now have a
>         problem
>         > connecting to PostgreSQL
>         > the error is:
>         > Error connecting to the server: FATAL:  password
>         authentication failed for
>         > user "postgres"
>         > FATAL:  password authentication failed for user "postgres"
>         >
>         > Seems simple enough! but I retype the password and no joy.
>         > I have another application that uses PostgreSQL (LedgerSMB)
>         and it works
>         > fine.
>         >
>         > After some research I changed the password using :
>         > ALTER USER postgres PASSWORD 'newPassword';
>         > in psql
>         > this also does not work
>         >
>         > I also edited pg_hba.comf and replaced the word 'ident' with
>         'trust' in the
>         > first line.
>         > I restarted the postgres server and still no joy.
>         >
>         > There has to be something simple that I am missing but I
>         can't see it!
>         > any help would be appreciated
>         >
>
>
>         The only reason I see is that you're not connecting to the
>         same server.
>
>
>         --
>         Guillaume
>          http://blog.guillaume.lelarge.info
>          http://www.dalibo.com
>          PostgreSQL Sessions #3: http://www.postgresql-sessions.org
>
>
> It is all to 127.0.0.1 there is no other PostgreSQL installation on
> the network
>

OK. Then, tell us exactly how you try to connect to your PostgreSQL
database, the exact error message you get, and give us the whole
pg_hba.conf file.


 
 I open pgAdmin and go to File - Add Server
I fill in the window that appears Name =test, Host =127.0.0.1 the next few are default
(port 5432, Maintaince DB and username both 'postgres') and enter password, click 'ok'
a window comes up warning me of storing password on the disk click 'ok'
Then I get the error above (it was copy and pasted)

my pg_hba.conf:
# Database administrative login by Unix domain socket
local   all             postgres                                ident
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

thanks for your help

  Altering user postgres with password 'NNNNNNN';
  made no difference

Bill

Re: Password authentication failing

From
Bill Appelbe
Date:
Solved
many thanks

Bill

On Thu, Dec 29, 2011 at 5:31 PM, Francisco Leovey <fleovey@yahoo.com> wrote:
Change the 2 md5 to trust and all will work

From: Bill Appelbe <bappelbe@gmail.com>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: pgadmin-support@postgresql.org
Sent: Thursday, December 29, 2011 2:23 PM
Subject: Re: [pgadmin-support] Password authentication failing



On Thu, Dec 29, 2011 at 5:04 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Thu, 2011-12-29 at 17:00 +0000, Bill Appelbe wrote:
>
>
> On Thu, Dec 29, 2011 at 4:47 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>         On Thu, 2011-12-29 at 16:31 +0000, Bill Appelbe wrote:
>         > Hi
>         > I installed Pgadmin3 version 1.12.3 on Linux Mint 12 which
>         also has
>         > PostgreSQL 8.4 installed.
>         >
>         > It all worked fine and I was able to look at the database.
>         > Then I went away for a few days, came back and now have a
>         problem
>         > connecting to PostgreSQL
>         > the error is:
>         > Error connecting to the server: FATAL:  password
>         authentication failed for
>         > user "postgres"
>         > FATAL:  password authentication failed for user "postgres"
>         >
>         > Seems simple enough! but I retype the password and no joy.
>         > I have another application that uses PostgreSQL (LedgerSMB)
>         and it works
>         > fine.
>         >
>         > After some research I changed the password using :
>         > ALTER USER postgres PASSWORD 'newPassword';
>         > in psql
>         > this also does not work
>         >
>         > I also edited pg_hba.comf and replaced the word 'ident' with
>         'trust' in the
>         > first line.
>         > I restarted the postgres server and still no joy.
>         >
>         > There has to be something simple that I am missing but I
>         can't see it!
>         > any help would be appreciated
>         >
>
>
>         The only reason I see is that you're not connecting to the
>         same server.
>
>
>         --
>         Guillaume
>          http://blog.guillaume.lelarge.info
>          http://www.dalibo.com
>          PostgreSQL Sessions #3: http://www.postgresql-sessions.org
>
>
> It is all to 127.0.0.1 there is no other PostgreSQL installation on
> the network
>

OK. Then, tell us exactly how you try to connect to your PostgreSQL
database, the exact error message you get, and give us the whole
pg_hba.conf file.


 
 I open pgAdmin and go to File - Add Server
I fill in the window that appears Name =test, Host =127.0.0.1 the next few are default
(port 5432, Maintaince DB and username both 'postgres') and enter password, click 'ok'
a window comes up warning me of storing password on the disk click 'ok'
Then I get the error above (it was copy and pasted)

my pg_hba.conf:
# Database administrative login by Unix domain socket
local   all             postgres                                ident
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

thanks for your help

  Altering user postgres with password 'NNNNNNN';
  made no difference

Bill



Re: Password authentication failing

From
Guillaume Lelarge
Date:
On Thu, 2011-12-29 at 17:47 +0000, Bill Appelbe wrote:
> Solved

It would be great to say how you solved it. It may help other users.


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com PostgreSQL Sessions #3:
http://www.postgresql-sessions.org



Re: Password authentication failing

From
Bill Appelbe
Date:
Solved using the recommendation:<br /><span>"Change the 2 md5 to trust and all will work"<br />in the pg_hba.conf
file<br/><br />thanks again Francisco<br /><br />Bill<br /></span><br /><div class="gmail_quote">On Thu, Dec 29, 2011
at6:07 PM, Guillaume Lelarge <span dir="ltr"><<a
href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 2011-12-29 at 17:47 +0000, Bill Appelbe
wrote:<br/> > Solved<br /><br /> It would be great to say how you solved it. It may help other users.<br /><div
class="HOEnZb"><divclass="h5"><br /><br /> --<br /> Guillaume<br />  <a href="http://blog.guillaume.lelarge.info"
target="_blank">http://blog.guillaume.lelarge.info</a><br/>  <a href="http://www.dalibo.com"
target="_blank">http://www.dalibo.com</a><br/>  PostgreSQL Sessions #3: <a href="http://www.postgresql-sessions.org"
target="_blank">http://www.postgresql-sessions.org</a><br/><br /></div></div></blockquote></div><br /> 

Re: Password authentication failing

From
Guillaume Lelarge
Date:
On Fri, 2011-12-30 at 08:50 +0000, Bill Appelbe wrote:
> Solved using the recommendation:
> "Change the 2 md5 to trust and all will work"
> in the pg_hba.conf file
> 

You do know what trust means, right? no check of any password? meaning
anyone can connect to your database with the highest permissions?


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com PostgreSQL Sessions #3:
http://www.postgresql-sessions.org



Re: Password authentication failing

From
Bill Appelbe
Date:
Are there any other suggestions?<br />It also does not answer why it worked last week and not now<br /><br />Bill<br
/><br/><div class="gmail_quote">On Fri, Dec 30, 2011 at 9:07 AM, Guillaume Lelarge <span dir="ltr"><<a
href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, 2011-12-30 at 08:50 +0000,
BillAppelbe wrote:<br /> > Solved using the recommendation:<br /> > "Change the 2 md5 to trust and all will
work"<br/> > in the pg_hba.conf file<br /> ><br /><br /></div>You do know what trust means, right? no check of
anypassword? meaning<br /> anyone can connect to your database with the highest permissions?<br /><div
class="HOEnZb"><divclass="h5"><br /><br /> --<br /> Guillaume<br />  <a href="http://blog.guillaume.lelarge.info"
target="_blank">http://blog.guillaume.lelarge.info</a><br/>  <a href="http://www.dalibo.com"
target="_blank">http://www.dalibo.com</a><br/>  PostgreSQL Sessions #3: <a href="http://www.postgresql-sessions.org"
target="_blank">http://www.postgresql-sessions.org</a><br/><br /></div></div></blockquote></div><br /> 

Re: Password authentication failing

From
Guillaume Lelarge
Date:
On Fri, 2011-12-30 at 09:42 +0000, Bill Appelbe wrote:
> Are there any other suggestions?
> It also does not answer why it worked last week and not now
> 

Well, no because the steps you show above seem the good ones. But saying
your problem is solved by using trust is wrong.

The only suggestion I have is to look into the pgadmin log file, and see
the connection string. You may need to make pgadmin log more to have
this information (probably debug level).


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com PostgreSQL Sessions #3:
http://www.postgresql-sessions.org