From: Aaron Spiteri <aaron@m1group.com.au>
To: Peter Arzamendi <arzamendi@berbee.com>
To: pgsql-admin@postgresql.org
Subject: Re: Password recover
Date: Mon, 24 Jun 2002 22:32:47 GMT
Message-ID: <20020624.22324700@scooby.m1group.com.au> (raw)
In-Reply-To: <000001c21a62$912910e0$1914a8c0@Arzamendi>
References: <000001c21a62$912910e0$1914a8c0@Arzamendi>
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='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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: aaron@m1group.com.au, arzamendi@berbee.com
Subject: Re: Password recover
In-Reply-To: <20020624.22324700@scooby.m1group.com.au>
References: <000001c21a62$912910e0$1914a8c0@Arzamendi> <20020624.22324700@scooby.m1group.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox