switch to postgres user in linux

On the VCSA you may want to switch to the postgres user to run some postgres commands it may be locked out. The commands below show how to make this user available

To enable the su to the postgres user, edit the /etc/passwd file and change the postgres user path from /bin/false to /bin/bash.
the vc password is also stored on .pgpass
YvCenter:~ # /opt/vmware/vpostgres/9.3/bin/psql -d VCDB vc
psql.bin: FATAL:  password authentication failed for user “vc”
password retrieved from file “/root/.pgpass”
Copy password from /etc/vmware-vpx/vcdb.properties
into
vi /root/.pgpass
localhost:5432:VCDB:postgres:TNFrM>Q1$z999<V4
localhost:5432:postgres:postgres:TNFrM>Q1$99p<V4
localhost:5432:VCDB:vc:TNFrM>Q1$z999V4
~

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s