Please enable Javascript for better experience...
 
How to Reset Forgotten Password of PostgreSQL DB Admin for VMware Site Recovery Manager
By Pranay Jha | Jul 21, 2020 | In Articles | Total Views [ 40 ]
(0 Like)
Rate

We were upgrading VMware SRM environment from version 6.5 to version 8.1, it was running with embedded PostgreSQL database. Unfortunetly, we forgot the password of DB Admin user which was must needed to proceed for rest of the upgradation part. Later, we thought to reset the password which worked perfectly for us, so wanted to share the same thing with you if you are also in same situation and want to use this trick.

Step by Step to Reset Password of PostgreSQL DB Admin account

Login to VMware Site Recovery Manager server where you have installed embedded PostgreSQL. Access below path and make a copy of pg_hba.conf

C:\ProgramData\VMware\VMware vCenter Site Recovery Manager Embedded Database\data

Here I have created another copy of pg_hba.conf which I will use to modify the information.

Stop service as showing below.
       Display Name -  VMware vCenter Site Recovery Manager Embedded Database
       Service Name - vmware-dr-vpostgres

Open pg_hba.conf file in notepad and highlight the following lines.

# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

Replace md to trust as showing in below file.

Save this file in same location as mentioned below.

C:\ProgramData\VMware\VMware vCenter Site Recovery Manager Embedded Database\data

Start service as showing below.
       Display Name -  VMware vCenter Site Recovery Manager Embedded Database
       Service Name - vmware-dr-vpostgres

Locate below path in same VMware SRM server where you have installed embedded PostgreSQL server.

C:\Program File\VMware\VMware vCenter Site Recovery Manager Embedded Database\Bin

Open Command Prompt using Administrator Priviledge and navigate to the directory.

cd "C:\Program File\VMware\VMware vCenter Site Recovery Manager Embedded Database\Bin"

Run below command to connect to PostgreSQL database.

psql -U postgres -p 5678

Run the following to change the password -

ALTER USER "srm_db_user_name" PASSWORD 'new_password';


Thanks for visiting here. Share this article if you found it useful.
Like Facebook Page https://www.facebook.com/VMwareInsight/
Connect to twitter https://twitter.com/imPranayK
Subscribe my Channel https://www.youtube.com/vmwareinsight
Connect over Linkedin https://in.linkedin.com/in/impranayk
Share this on Social Media

About the Author

Pranay Jha
Pranay Jha
Founder, Contributer VMwareInsight.com

Public profile: user/profile/99900000


Follow me

facebook linkedin twitter G+ VMTN youtube

Thank you for visiting my profile. I am Pranay Jha, bring along a total of 11+ years of extensive experience with me in Information Technology sector for organizations from small business to large enterprises, wherein my current assignment I am associated with IBM as a Technical Solution Architect for Virtualization platform. I am vExpert x 3 (16/17/18), VCIX-DCV, VCAP5/6-DCD, VCAP5-DCA, VCP7-CMA, VCP5/6-DCV, VCA-DCV, VCA-Cloud, VSP, VCE-CIA, MCITP, MCSE, MCSA(Messaging). I am also an Independent blogger and founder of http://vmwareinsight.com and https://cloudpathshala.com. I can be reached via email at pranay1988jha@gmail.com or Direct Message via Contact Us form.

 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment
 
Sponsors
 
 
 
 
 
Facebook Likes