How to change vFabric PostgreSQL DB User Password

By | 27/07/2015

If you need to change the password on for existent user (in my case vcac user), just follow the steps below.

Login into vFabric Postgres as root and then:

# su postgres 

# /opt/vmware/vpostgres/9.2/bin/psql

when you’re in:

ALTER USER vcac WITH PASSWORD ‘<newpassword>’;

\q

To check if the new credentials are valid:

Login into vFabric Postgres as root switch as postgres user (su postgres) and launch the following command:

# /opt/vmware/vpostgres/9.2/bin/psql –U vcac –W 

(note if you’ve changed also the db port, as in my case, add the –p option in the syntax)

With option –W the password is required and if you’ve changed successfully you can access to your DB:

# /opt/vmware/vpostgres/9.2/bin/psql vcacdb -U vcac -W -p 5433

could not change directory to “/root”

Password for user vcac:

psql.bin (9.2.6)

Type “help” for help.

vcacdb=> \l

                             List of databases

   Name    |  Owner   | Encoding | Collate | Ctype |   Access privileges

———–+———-+———-+———+——-+———————–

 postgres  | postgres | UTF8     | C       | C     |

 template0 | postgres | UTF8     | C       | C     | =c/postgres          +

           |          |          |         |       | postgres=CTc/postgres

 template1 | postgres | UTF8     | C       | C     | =c/postgres          +

           |          |          |         |       | postgres=CTc/postgres

 vcacdb    | vcac     | UTF8     | C       | C     |

(4 rows)

Leave a Reply

Your email address will not be published. Required fields are marked *