disable password protection

The best option for the password is to lower security so it’s not required to enter a password when you log into postgres

Here’s how you do this.

search for pg_hba.conf on vcsa or windows

example C:\ProgramData\VMware\vCenterServer\data\vpostgres\pg_hba.conf
backup the file

change md5 to trust, so the entries in your file look like the once  below
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

A reload of postgres will be needed for this to take effect

 

/opt/vmware/vpostgres/current/bin/pg_ctl -D /storage/db/vpostgres stop

/opt/vmware/vpostgres/current/bin/pg_ctl -D /storage/db/vpostgres start

 

Sometimes you may want to run commands as the vpostgres OS user.

As root

vi /etc/passwd

change from noloin to! / bin/bash. see example  below

vpostgres:x:1012:100::/opt/vmware/vpostgres/9.4:/bin/bash

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s