How to change the password for Ranger users

You can change the password for multiple Ranger users without using the Ranger Admin Web UI.

To change the passwords of Ranger users defined in the Ranger Admin modules without using the Ranger Admin Web UI, use the following steps:

Change current working directory to the Ranger Admin installation directory.
  1. Set/export JAVA_HOME environment variable if not set.
    export JAVA_HOME=/usr/java/jdk1.8.0_232-cloudera
  2. In the ranger-admin process run directory:
    1. Find the proc.json file.
    2. Search for HADOOP_CREDSTORE_PASSWORD.
    3. Use that password to export it in the env variable.
    export HADOOP_CREDSTORE_PASSWORD=2fl2xmsd5zrp9homuqwwwe3it
  3. Copy the sql connector jar to ranger-admin ews/lib directory.
    cp /usr/share/java/mysql-connector-java.jar /opt/cloudera/parcels/CDH/lib/ranger-admin/ews/lib/
  4. Run the change password util command
    python changepasswordutil.py testuser1 Testuser1 Test12345