• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Change Engine Database Password for RHVM Engine

by admin

This post illustrates steps to change engine database password for RHVM engine.

1. Before modification, you can run below commands to check the current ENGINE_DB_PASSWORD for RHEVM engine interacting with the engine database. By default, ENGINE_DB_PASSWORD is a random string which is auto-generated by engine-config during the setup process. The ENGINE_DB_PASSWORD is used by below files:

[root@rhevm-engine ~]# cat /etc/ovirt-engine/engine.conf.d/10-setup-database.conf |grep "ENGINE_DB_PASSWORD"
ENGINE_DB_PASSWORD="xxxxxxxx"  

[root@rhevm-engine ~]# cat /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf |grep "ENGINE_DB_PASSWORD"
ENGINE_DB_PASSWORD="xxxxxxxx"

[root@rhevm-engine ~]# cat /etc/ovirt-engine/aaa/internal.properties |grep dbpassword
config.datasource.dbpassword=xxxxxxxx

2. Follow below steps to change engine database password:

a. Stop the ovirt-engine process:

[root@rhevm-engine ~]# systemctl stop ovirt-engine

b. Stop oVirt Engine Data Warehouse service:

[root@rhevm-engine ~]# systemctl stop ovirt-engine-dwhd

c. Change the credentials that the engine process sends to the database by modifying ENGINE_DB_PASSWORD with the new password:

[root@rhevm-engine ~]# vi /etc/ovirt-engine/engine.conf.d/10-setup-database.conf
ENGINE_DB_PASSWORD="YourNewPassword"  

[root@rhevm-engine ~]# vi /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf
ENGINE_DB_PASSWORD="YourNewPassword"

d. Change internal domain dbpassword:

[root@rhevm-engine ~]# vi /etc/ovirt-engine/aaa/internal.properties

config.datasource.dbpassword=YourNewPassword

e. Change the postgres database credentials:

By default, the name of the user in ENGINE_DB_USER and database in ENGINE_DB_DATABASE are both “engine”:

[root@rhevm-engine ~]# cat /etc/ovirt-engine/engine.conf.d/10-setup-database.conf
ENGINE_DB_HOST="localhost"
ENGINE_DB_PORT="5432"
ENGINE_DB_USER="engine"
ENGINE_DB_DATABASE="engine"

Connect to the ‘Postgres’ database to alter the engine db user and postgres passwords:

[root@rhevm-engine ~]# su - postgres
Last login: Thu Apr 30 15:29:48 AEST 2020 on pts/1

-bash-4.2$ scl enable rh-postgresql95 -- psql
psql (9.5.14)
Type "help" for help.

postgres=# alter user engine with password 'YourNewPassword';
ALTER ROLE

postgres-# alter user postgres with password 'YourNewPassword';
ALTER ROLE

postgres=# \q
-bash-4.2$ exit
logout

f. Start ovirt-engine and Data Warehouse service to take effect:

[root@rhevm-engine ~]# systemctl start ovirt-engine
[root@rhevm-engine ~]# systemctl start ovirt-engine-dwhd

Now you can use now use the new credentials to access the engine database.

Filed Under: CentOS/RHEL, RHV

Some more articles you might also be interested in …

  1. How To Configure NIS (Network Information System) Master and Slave Servers in CentOS/RHEL
  2. How to remove unwanted entries in /etc/shadow file
  3. Intel I219-LM Centos 6 network failed to start
  4. “error: Bind to port 2222 on 0.0.0.0 failed: Permission denied” – error while starting sshd service on CentOS/RHEL
  5. How to install virtual machines optimized and configured for the Red Hat Virtualization environment
  6. How to Hot-add and Remove Logical Memory in CentOS/RHEL 7
  7. IBM DB2 Installation on Red Hat Enterprise Linux
  8. ‘error opening class fc_host’ – systool Command Error on CentOS/RHEL 7 and 8
  9. How to disable ICMP redirects on CentOS/RHEL
  10. lvsd Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright