How to change the Vertica database password
search cancel

How to change the Vertica database password

book

Article ID: 37684

calendar_today

Updated On:

Products

CA Performance Management Network Observability

Issue/Introduction

The Vertica dradmin default user is created during the installation of Vertica (Data Repository).

This user can run the Data Repository processes and the Administration Tools (adminTools) utility and owns the Data Repository (DR) catalog files, data files, and so on.

It is also the default OS level user created on the system. This article is specifically for changing the Vertica database password.

Some of our customers have strict password security policies that must be adhered to.

If you are required to change the actual dradmin password for the Vertica database, that would require the 'alter user' call, as well as updating the dbconnection.cfg on the Data Aggregator (DA) system.

You should shut down the DA prior to making this change. 

Environment

DX NetOps CAPM all currently supported releases

Cause

You cannot change the database password with admintools.

This must be done using vsql, while logged in as dradmin on the Data Respository system:

Resolution

In the example below, we will change the database passwd 'dbpass' to the new passwd 'dbpass2' :

  1. Login to the dradmin user [root@IMDR ~]#  su - dradmin

  2. Then enter the Vertica SQL shell by running: /opt/vertica/bin/vsql

    Welcome to vsql, the Vertica Analytic Database interactive terminal.

    Type: \h or \? for help with vsql commands
    \g or terminate with semicolon to execute query
    \q to quit

  3. At the SQL command prompt, run:

    dradmin=> alter user dradmin IDENTIFIED BY 'dbpass2' REPLACE 'dbpass';

    ALTER USER


  4. Then quit;

    dradmin=> \q


    >>>> where dbpass = your current password and dbpass2 is your intended new password

  5. Verify the change by connecting to the database using the adminTools utility:

    /opt/vertica/bin/adminTools

  6. Select:

              2. Connect to Database

  7. Now get the encrypted value of the new password by running:

    cd /opt/IMDataAggregator/scripts/common.tools.encryption/
    ./doEncryption.sh dradmin <New Password - dbpass2>

  8. Now login to the Data Aggregator and modify the dbpassword in /opt/IMDataAggregator/apache-karaf-<VER>/etc/dbconnection.cfg with the returned encrypted password from above.

    dbUser=dauser
    dbEncryptedPassword=QUVTOkMZrUfMytW85NBX+bj7T4w=
    dbAdminUser=dradmin
    dbEncryptedAdminPassword=QUVTOmwDpCHP5zlGhX7b2ce9I9M=   <<--- Replace this one with the encrypted output of Step 7 above


  9. Save the file.

    You will also need to check your Vertica backup .ini (Default:backup_restore_full_local.ini) file for the location of the passwordFile file (Default password.txt) location and change the password in that file to the new dbadmin password.