Skip to main content
Version: 2.10

Resetting the admin password for D1 or Conversion Service

If you forgot the password of the admin user and you cannot log in to D1 or Conversion Service, follow the procedures described on this page to reset the password.

Note

You cannot simply edit the installation file and reset the password when the password is already persisted in the database.

You can reset the password of the admin user in one of the following ways:

  • Reset the password by modifying the configuration.json file (no reinstallation is required)
  • Reset the password by modifying the installation-settings.yaml file (reinstallation is required)

Before you begin

  1. Encrypt a value that you are going to set as a new admin password. For this purpose, you can use the encrypt.sh script provided in your package. Copy the encrypted password to clipboard.
  2. Shut down the D1 or Conversion Service instance for which you forgot the password.

To reset the password in the configuration.json

If you do not want to reinstall the whole D1, follow the procedure below to reset the admin password. You will need access to the installation directory.

  1. Open the installation directory where D1/Conversion Service is installed.

  2. Open the conf folder.

  3. Open the configuration.json file in a text editor, and go to the the relevant part of the file where bind-id is set to tribefire-admin-user:

     {"_type": "com.braintribe.cartridge.common.processing.configuration.url.model.RegistryEntry", "_id": "0",
    "bindId": "tribefire-admin-user",
    "denotation": {"_type": "com.braintribe.model.user.User", "_id": "1",
    "name": "admin",
    "password": "${decrypt('FWnpV1EI0oMcpeMYCaHoFhBRUYBghnXSrw/hH43dkmSLSJI9qT2V/vXym1b/8zIYvalWVw==')}"
    }
  4. Paste your encrypted value into the password property field. Save and close the file.

  5. Open the tribefire.properties file.

  6. Set TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD=true. This will enforce the newly set password to be used.

  7. Start the node again.

You should now be able to log in with the new password.

Note

You cannot use TRIBEFIRE_AUTH_ADMIN_USERNAME and TRIBEFIRE_AUTH_ADMIN_PASSWORD properties in this case, because they are overridden by settings in the configuration.json file.

To reset the password from the installation file

You can edit the admin user credentials inside the installation-settings.yaml file used for installation, provided that you add the TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD: "true" property to the file. You need to re-install D1 for your changes to take effect.

  1. Open your deployment package directory.

  2. Open the installation yaml file. Paste your encrypted password into the ADMIN_USER section:

    # ** Admin User **
    # Configures the credentials for the default admin user.
    # If the user doesn't exist yet, it will be created and the password will be set as specified here.
    # If the user already exists, nothing will be done, i.e. its password will NOT be changed!
    predefinedComponents:
    ADMIN_USER: !com.braintribe.model.user.User
    # Admin user name
    name: "admin"
    # Admin user password. Replace "[ENCRYPTED_PASSWORD]" with the encrypted password, e.g. "${decrypt('HMuN/VXo5+L0vVQzuJe7bAOiBmeKzWluP+POb7zjkcLCnzgawUfWmZAIu9eIOfVAzEQn6Q==')}".
    password: "${decrypt('7tykS+5v1dHkYfW+tAZHSxr/8VZiAh21dJMGyC4LIbbU8Ru5mv/8ugDCwVOj4wyti0roYg==')}"
  3. Add the TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD: "true" property to the file.

        # ** Runtime Properties **
    # Runtime properties are used to configure application specific settings. Which properties are available/required depends on the application.
    # For the complete list of supported runtime properties refer to the documentation. However, all important/mandatory properties are listed below.
    runtimeProperties:
    ##############################################################################
    # Platform settings
    ##############################################################################

    TRIBEFIRE_AUTH_ADMIN_ENFORCEPASSWORD: "true"


    # This enables support for encrypted passwords in this configuration file (don't change!)
    TRIBEFIRE_SECURED_ENVIRONMENT: "true"
  4. Reinstall D1. You should now be able to log in with the new password.