From: | Muhammad Ikram <mmikram(at)gmail(dot)com> |
---|---|
To: | Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com> |
Cc: | Benjamin Lund <blund(at)student(dot)unimelb(dot)edu(dot)au>, pgadmin-support(at)postgresql(dot)org |
Subject: | Re: Forgotten Password |
Date: | 2024-08-05 06:52:38 |
Message-ID: | CAGeimVqLa9JbUkDGZW99ESG3BpavZWi_UXQZecU1UVHuofwVAA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Hi Benjamin,
If you are still not able to locate pg_hba.conf then please try to find it
using find command. Here is a sample on my mac machine.
find /Library/PostgreSQL -name pg_hba.conf
/Library/PostgreSQL/14/data/pg_hba.conf
Ensure that you have permissions to edit this file.
Once you are able to open and edit this file then you may replace (
*scram-sha-256* with *trust) *for the user*.* You will be able to login
without a password. Set new password and then revert back the changes in
pg_hba.conf file to keep PostgreSQL secure.
Sample from pg_hba.conf given below
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all
scram-sha-256
# IPv4 local connections:
host all all 127.0.0.1/32
scram-sha-256
Regards,
Muhammad Ikram
On Mon, Aug 5, 2024 at 9:36 AM Khushboo Vashi <
khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
> Hi,
>
> On Fri, Aug 2, 2024 at 4:50 PM Benjamin Lund <blund(at)student(dot)unimelb(dot)edu(dot)au>
> wrote:
>
>> Hi there,
>>
>> I have recently created an account on pgAdmin 4 as part of a university
>> course. After making a server with this account and password, I then went
>> to reopen this server a few days later only to realise I needed my password
>> which I have sadly forgotten.
>>
> If you forgot the pgAdmin password, then the Forgot Password link is there
> on the login page.
> If you forgot your PostgreSQL password, then as mentioned by you, find the
> pg_hba file and do appropriate changes to login without password, you will
> find many blogs/videos for that.
>
>>
>> I have looked online for help, but I am unable to find the mentioned
>> 'pg_hba' file that I need. For reference I am working on Mac.
>>
>> Is there any other way I can reset this password and gain access to the
>> server? I have also tried uninstalling the application but this has not
>> solved the issue and when reinstalled it is still attached to my
>> account/password.
>>
> How have you installed Postgres?
>
>>
>> Thanks,
>>
>> Ben
>>
>
--
Muhammad Ikram
From | Date | Subject | |
---|---|---|---|
Next Message | Aditya Toshniwal | 2024-08-08 12:46:20 | Re: Query tool data grid - Infinite scroll vs Pagination |
Previous Message | Khushboo Vashi | 2024-08-05 04:36:01 | Re: Forgotten Password |