Search Postgresql Archives

Re: Lost password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin,

You need to find the file pg_hba.conf.

Inside of it find the lines showing:
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5

Change the md5 to trust, make sure it is only for local host that you do it.

Save the file and restart your postgres server.

Use pgAdmin and connect to the server. When prompted for a password, give it an empty password.

Press the SQL toolbar button and run the following script:

ALTER USER <yourusername> SET PASSWORD = 'newpassword'

Edit the pg_hba.conf file again and change the trust back to what it was.

Restart the server.

HTH,

Johan Nel
Pretoria, South Africa.

Martin Roach wrote:
Hi
I started the installation of postrgres got distracted and then started again but forgot my password. I have received the info below: Now what? If you have access to shell account on the machine PostgreSQL is running, and your shell works as the same user as Postgres itself, or root - solution is easy.
Find your pg_hba.conf file. It might be in many files so try:

    * $ locate pg_hba.conf
    * find /var/lib/ -type f -name pg_hba.conf
    * find /etc -type f -name pg_hba.conf
* find / -type f -name pg_hba.conf
Of course last option is your last resort - it will take a long time.
However, i'm not that computer savvy and don't now how to go about the above. How come you can't just delete the software and try again? Any help in finding these files and working what to do would be a massive help.

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux