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
Open a command prompt and log in using the Contrast service account created during installation. For example:
sudo -su contrast_service
Shut down the Contrast server with this command:
$CONTRAST_INSTALLATION/bin/contrast-server stop
Are you going to use the
contrast-server.vmoptions
file to reset the password?To reset the password with the
contrast-server.vmoptions
file, use this procedure:Go to the
$CONTRAST_INSTALLATION/bin
directory. On most systems, this directory is/opt/Contrast/bin
.Open the
contrast-server.vmoptions
file in a text editor.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>
To reset the password with environment variables instead of the
vmoptions
file, use this procedure:Go to the
$CONTRAST_INSTALLATION
directory. On most systems, this directory is/opt/Contrast
.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>"
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.
Shut down the Contrast server with this command:
$CONTRAST_INSTALLATION/bin/contrast-server stop
If you used the
contrast-sersver.vmoptions
file, remove the options you added in step 4.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.