i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

i am getting issue as FATAL: password authentication failed for user ' postgres' tried

prachi surangalikar
hello team,
i have  tried every  thing  but still i  could not find the solution to this problem.
i made changes in the pg_hba.conf file also , please help me to solve this problem.
Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Adrian Klaver-4
On 6/17/20 7:14 PM, prachi surangalikar wrote:
> hello team,
> i have  tried every  thing  but still i  could not find the solution to
> this problem.
> i made changes in the pg_hba.conf file also , please help me to solve
> this problem.

What is the connection string you are using when you get the error?

What are the settings in the pg_hba.conf file?



--
Adrian Klaver
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Adrian Klaver-4
In reply to this post by prachi surangalikar
On 6/17/20 7:14 PM, prachi surangalikar wrote:
> hello team,
> i have  tried every  thing  but still i  could not find the solution to
> this problem.
> i made changes in the pg_hba.conf file also , please help me to solve
> this problem.

Should have added to previous post:

Are you sure that you are using the correct password or that the
'postgres' user has a password?

--
Adrian Klaver
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

o1bigtenor
In reply to this post by prachi surangalikar
On Wed, Jun 17, 2020 at 9:14 PM prachi surangalikar
<[hidden email]> wrote:
>
> hello team,
> i have  tried every  thing  but still i  could not find the solution to this problem.
> i made changes in the pg_hba.conf file also , please help me to solve this problem.

As  a noob to programming and under the hood stuff I have found myself
with this
issue a few times. My method to 'fix' this problem is likely not
sanctioned but as I'm
working on my system on my stuff - - - oh well it works even if its NOT elegant!

When my password for postgres doesn't work.
1. I try again a couple times
2. still not working I go back into the pg_hba.conf file and comment out
    the 'new' part where postgresql has moved from no password to password
3. next step is to stop and restart postgresql
4. now you log into postgresql and given postgres a password
    (I would suggest writing it down - - - - you need to remember it!!
     One technique I use is to have a password that I can refer to in some way
     where I don't write out the password. Say you might use something based
     on a specific bit of text. You write down the directions to that
text but not
     the actual password - - - the directions should be enough of a tip so that
     you can remember the actual password!)
5. now you again modify your pg_hbs.conf file to require a password

I will admit to having occasionally needing to do this a few times in
fairly quick
succession. Using this method (I don't remove the lines from the hb_pga.conf
file I just comment them out) has reduced my stress levels at least a little.
This may not be the most secure way of doing things but if your
cracker has access
to your machine to review conf files - - - - I'd say you have some large issues
happening already.

Regards


Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Peter J. Holzer
In reply to this post by Adrian Klaver-4
On 2020-06-17 20:00:51 -0700, Adrian Klaver wrote:

> On 6/17/20 7:14 PM, prachi surangalikar wrote:
> > i have  tried every  thing  but still i  could not find the solution to
> > this problem.
> > i made changes in the pg_hba.conf file also , please help me to solve
> > this problem.
>
> Should have added to previous post:
>
> Are you sure that you are using the correct password or that the 'postgres'
> user has a password?
And that the OP is indeed using the 'postgres' user and not the ' postgres'
user (as she wrote in the subject).

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [hidden email]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Adrian Klaver-4
In reply to this post by Adrian Klaver-4
On 6/22/20 9:18 PM, prachi surangalikar wrote:
Please relpy to list also.
Ccing lis.
> i  tried to connect to postgres using psql  and then its asking me
> password for user 'administrator' but i have not created any
> administrator user and when i logged in as user 'postgres' it is asking
> for  password then when i entered password it said password
> authentication failed for user 'postgres'.
> Even when i connect using pgadmin its giving the same error.

Are you running this on Windows and using the Enterprise DB download of
Postgres?

If so when you installed Postgres the installer asked you to create a
password. This is the password you need when connecting via pgAdmin. Now
the 'administrator' could also mean the program(psql) needs to run as
the Windows Administrator. Can you show the command you are running and
where/when you being prompted for the password?

>
> Do i need to change any configuration in pg_hba.conf file?
> or add the user 'administrator' in the conf file.
>
> On Thu, Jun 18, 2020 at 8:25 AM Adrian Klaver <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 6/17/20 7:14 PM, prachi surangalikar wrote:
>      > hello team,
>      > i have  tried every  thing  but still i  could not find the
>     solution to
>      > this problem.
>      > i made changes in the pg_hba.conf file also , please help me to
>     solve
>      > this problem.
>
>     What is the connection string you are using when you get the error?
>
>     What are the settings in the pg_hba.conf file?
>
>
>
>     --
>     Adrian Klaver
>     [hidden email] <mailto:[hidden email]>
>


--
Adrian Klaver
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Bruce Momjian
In reply to this post by Peter J. Holzer
On Sat, Jun 20, 2020 at 06:28:52PM +0200, Peter J. Holzer wrote:

> On 2020-06-17 20:00:51 -0700, Adrian Klaver wrote:
> > On 6/17/20 7:14 PM, prachi surangalikar wrote:
> > > i have  tried every  thing  but still i  could not find the solution to
> > > this problem.
> > > i made changes in the pg_hba.conf file also , please help me to solve
> > > this problem.
> >
> > Should have added to previous post:
> >
> > Are you sure that you are using the correct password or that the 'postgres'
> > user has a password?
>
> And that the OP is indeed using the 'postgres' user and not the ' postgres'
> user (as she wrote in the subject).

Uh, how are those different?

--
  Bruce Momjian  <[hidden email]>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee



Reply | Threaded
Open this post in threaded view
|

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

Adrian Klaver-4
On 6/23/20 3:16 PM, Bruce Momjian wrote:

> On Sat, Jun 20, 2020 at 06:28:52PM +0200, Peter J. Holzer wrote:
>> On 2020-06-17 20:00:51 -0700, Adrian Klaver wrote:
>>> On 6/17/20 7:14 PM, prachi surangalikar wrote:
>>>> i have  tried every  thing  but still i  could not find the solution to
>>>> this problem.
>>>> i made changes in the pg_hba.conf file also , please help me to solve
>>>> this problem.
>>>
>>> Should have added to previous post:
>>>
>>> Are you sure that you are using the correct password or that the 'postgres'
>>> user has a password?
>>
>> And that the OP is indeed using the 'postgres' user and not the ' postgres'
>> user (as she wrote in the subject).
>
> Uh, how are those different?
>

Extra space.

It happens:

https://stackoverflow.com/questions/62541581/django-db-utils-operationalerror-fatal-password-authentication-failed-for-user

--
Adrian Klaver
[hidden email]