Skip site navigation (1) Skip section navigation (2)

Re: Password recover

From: Aaron Spiteri <aaron(at)m1group(dot)com(dot)au>
To: Peter Arzamendi <arzamendi(at)berbee(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: Password recover
Date: 2002-06-24 22:32:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I had the same problem a while a go the way I fixed was like this:
1.Log in has root user on the server.
2.Swith  to postgres user "su postgres"
3.Make a back up of your pg_hda.conf file. On  RH this is in 
4.Alter the pg_hda.conf to trust all types of conections and restart the 
postmaster. Something like "/etc/init.d/postgres restart"
5.Log into PG using "pgsql template1" then change the sa password using 
6.You can also check what the password is depending on how the 
pg_hda.conf file was setup by using the following syntax in pgsql. 
"SELECT * FROM pg_shadow WHERE usename='sa';
7.Note that on PG < version 7 the syntax is slightly different you do not 
put the "'" around the password.
8.Copy the backup of the pg_hda.conf file on top of the altered 
pg_hda.conf file and restart the postmaster.
9.Check that your security is back to normal.
Hope this helps.

Original Message dated 23/06/02, 13:03:34
Author: "Peter Arzamendi" <arzamendi(at)berbee(dot)com>
Re: [ADMIN] Password recover:

Is there a way to recover the sa password? 

In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2002-06-24 22:55:22
Subject: Re: Slow Remote connection
Previous:From: Larry RosenmanDate: 2002-06-24 17:59:41
Subject: Re: Password recover

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group