Thursday, March 12, 2015

Changing the default VMware vCenter Server Appliance database password (2056968)

Changing the default VMware vCenter Server Appliance database password

 

 

Details

You can change the default password for the VMware vCenter Server Appliance database when you want or if the password is compromised.

Solution

To change the default:
  1. Change the embedded database password:

    1. Connect to the vCenter Server Appliance using SSH.
    2. Open the embedded_db.cfg file for editing with this command:

      vi /etc/vmware-vpx/embedded_db.cfg

    3. In the file, locate EMB_DB_PASSWORD and change the password between the single quotation marks.
  2. Change the password for the vc and postgres database users:

    1. Connect to the vPostgres database for SQL execution by running this command:

      /opt/vmware/vpostgres/current/bin/psql -d VCDB U postgres

    2. Run these SQL statements to change the passwords for the vc and postgres users:

      alter user postgres with password 'new-password';
      alter user vc with password 'new-password';

    3. Exit the database with this command:

      \q

    4. Open the .pgpass file for editing by running this command:

      vi /root/.pgpass
    5. Modify the .pgpass file with the new password as follows:

      localhost:5432:VCDB:postgres:new-password
      localhost:5432:postgres:postgres:new-password
      localhost:5432:VCDB:vc:new-password
  3. Change the postgres database password:

    1. To change the password for the vPostgres database by running this command:

      passwd postgres

    2. Type the new password.
    3. Retype the new password.
  4. To update the encrypted password in the vpxd.cfg file, run this command:

    /usr/sbin/vpxd -p

  5. Enter the password when prompted.
  6. Run this command to restart the vpxd service:

    /etc/init.d/vmware-vpxd restart

No comments:

Post a Comment