Thread: Password recover
Is there a way to recover the sa password?
Thanks,
Pete
On Sat, 2002-06-22 at 22:03, Peter Arzamendi wrote: > Is there a way to recover the sa password? What version of PostgreSQL? > > Thanks, > Pete > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
I had the same problem a while a go the way I fixed was like this:
Log in has root user on the server.
Swith to postgres user "su postgres"
Make a back up of your pg_hda.conf file. On RH this is in /var/lib/pgsql/data
Alter the pg_hda.conf to trust all types of conections and restart the postmaster. Something like "/etc/init.d/postgres restart"
Log into PG using "pgsql template1" then change the sa password using "ALTER USER sa WITH PASSWORD 'password';
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';
Note that on PG < version 7 the syntax is slightly different you do not put the "'" around the password.
Copy the backup of the pg_hda.conf file on top of the altered pg_hda.conf file and restart the postmaster.
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
On Sat, 2002-06-22 at 22:03, Peter Arzamendi wrote: > Is there a way to recover the sa password? > > Thanks, > Pete Do you need to know what the password was, or just access password protected databases? -crl -- Chad R. Larson (CRL15) 602-953-1392 Brother, can you paradigm? chad@dcfinc.com chad@larsons.org larson1@home.com DCF, Inc. - 14623 North 49th Place, Scottsdale, Arizona 85254-2207