Skip to main content

Reset SuperAdmin password on Linux

To change the SuperAdmin password, edit the contrast-server.vmoptions file or use environment variables.

In most cases, editing the contrast-server.vmoptions file is the easiest method to use. If you are using containers for your Contrast application, use environment variables to reset the password.

Steps

  1. Open a command prompt and log in using the Contrast service account created during installation. For example:

    sudo -su contrast_service

  2. Shut down the Contrast server with this command:

     $CONTRAST_INSTALLATION/bin/contrast-server stop
  3. Are you going to use the contrast-server.vmoptions file to reset the password?

  4. To reset the password with the contrast-server.vmoptions file, use this procedure:

    1. Go to the $CONTRAST_INSTALLATION/bin directory. On most systems, this directory is /opt/Contrast/bin.

    2. Open the contrast-server.vmoptions file in a text editor.

    3. Add the following options to the file (replace youremaildomain.com with your email domain):

      -Dreset.superadmin=true
      -Dsuperadmin.username=contrast_superadmin@<your.email.domain.com>
      -Dsuperadmin.password=<password>
  5. To reset the password with environment variables instead of the vmoptions file, use this procedure:

    1. Go to the $CONTRAST_INSTALLATION directory. On most systems, this directory is /opt/Contrast.

    2. Enter the following command:

       export INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS -Dreset.superadmin=true -Dsuperadmin.username=contrast_superadmin@<your.email.domain.com> -Dsuperadmin.password=<new password>"
  6. Start the Contrast server with this command:

      $CONTRAST_INSTALLATION/bin/contrast-server start

    When the server starts, use the password you specified in step 4 or 5.

  7. Shut down the Contrast server with this command:

     $CONTRAST_INSTALLATION/bin/contrast-server stop
  8. If you used the contrast-sersver.vmoptions file, remove the options you added in step 4.

  9. Start the Contrast server as you normally would and exit the shell.

    If you used environment variables to reset the password, this step clears the password from the INSTALL4J_ADD_VM_PARAMS environment variable.