Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 3A01B476398 for ; Mon, 24 Jun 2002 19:13:34 -0400 (EDT) Mailbox-Line: From aaron@m1group.com.au Mon Jun 24 19:13:34 2002 Received: from pugsly.m1group.com.au (unknown [144.135.2.168]) by postgresql.org (Postfix) with ESMTP id 99936476667 for ; Mon, 24 Jun 2002 18:34:51 -0400 (EDT) Received: from scooby.m1group.com.au ([192.168.100.96]) by pugsly.m1group.com.au (8.11.2/8.11.0) with SMTP id g5OMNrh20476; Tue, 25 Jun 2002 06:23:53 +0800 From: Aaron Spiteri Date: Mon, 24 Jun 2002 22:32:47 GMT Message-ID: <20020624.22324700@scooby.m1group.com.au> Subject: Re: Password recover To: Peter Arzamendi , In-Reply-To: <000001c21a62$912910e0$1914a8c0@Arzamendi> References: <000001c21a62$912910e0$1914a8c0@Arzamendi> X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Linux) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary= "------------=_4D48007F05F80917BBA0" Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-3.4 required=5.0 tests=IN_REP_TO version=2.30 X-Spam-Level: X-Archive-Number: 200206/195 X-Sequence-Number: 4629 --------------=_4D48007F05F80917BBA0 Content-Description: filename="text1.txt" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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=20 /var/lib/pgsql/data 4.Alter the pg_hda.conf to trust all types of conections and restart the=20 postmaster. Something like "/etc/init.d/postgres restart" 5.Log into PG using "pgsql template1" then change the sa password using=20 "ALTER USER sa WITH PASSWORD 'password'; 6.You can also check what the password is depending on how the=20 pg_hda.conf file was setup by using the following syntax in pgsql.=20 "SELECT * FROM pg_shadow WHERE usename=3D'sa'; 7.Note that on PG < version 7 the syntax is slightly different you do not= =20 put the "'" around the password. 8.Copy the backup of the pg_hda.conf file on top of the altered=20 pg_hda.conf file and restart the postmaster. 9.Check that your security is back to normal. Hope this helps. Aaron@m1group.com.au Original Message dated 23/06/02, 13:03:34 Author: "Peter Arzamendi" Re: [ADMIN] Password recover: Is there a way to recover the sa password?=20 Thanks,=20 Pete=20 --------------=_4D48007F05F80917BBA0 Content-Description: filename="text1.html" Content-Type: text/html Content-Transfer-Encoding: quoted-printable Re: [ADMIN] Password recover

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 /var/lib/pgsql/data

  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 "ALTER USER sa WITH PASSWORD 'password';

  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=3D'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.

Aaron@m1group.com.au




Original Message dated 23/06/02, 13:03:34

Author: "Peter Arzamendi" <arzamendi@berbee.com>

Re: [ADMIN] Password recover:




Is there a way to recover the sa password?

Thanks,
Pete

--------------=_4D48007F05F80917BBA0--