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
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.
change from noloin to! / bin/bash. see example below