The first step is to ensure no passwords are
required. You can do this by logging into
your system as root. Find your pg_hba.conf
file and set all previleges as trust. Then restart
postgres so the changes to pg_hba.conf take effect.
You may need to login or su to postgres to re-start
the database.
Now you should be able to access the template1
database as follows:
#>psql template1 postgres
Next, come out of postgres and login as root. Change the
linux password of the postgres user as follow:
#>passwd postgres
To change the postgresql postgres password, I alway
start pgaccess. You can start pgaccess from the linux desktop by opening a terminal window and typing:
#>pgaccess
Connect to the template1 database using pgaccess. Once
connect in throught pgaccess, select users. Select
postgres from the list of user that appear. Then select
design. A window will open that allows you to change
the postgresql password of the su postgres. Use the same
username/password pair that you used for the linux postgres
user.
Now you can edit the pg_hba.conf file again and change
the security to require passwords. If you get stuck, you
can login as root again and set security to trust to
setup everything again.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.