Skip to content

Technical Reference: Admin Password Reset Logic

Parent Page: [How-To: Rhapsody User Management] Description: This document details the technical execution performed by the Ansible playbook (rhapsody_reset_admin_password.yml) when the "Reset Admin Password" workflow is triggered.

🔍 High-Level Overview

This automation utilizes Rhapsody's built-in "magic file" mechanism to reset the administrator credentials. Instead of directly modifying the database or configuration files, the playbook places a specific trigger file in the Rhapsody data directory. When the Rhapsody engine detects this file (typically upon the next service restart), it resets the admin user's password to the factory default.

🔄 Workflow Diagram

graph TD
    A[Start] --> B[Define Data Directory]
    B --> C[Touch Magic File]
    C --> D{ResetAdministratorPassword.action}
    D --> E[Set Owner 'rhapsody']
    E --> F[Finish]
    F -.-> G[Manual/Scheduled Restart Required]

🛠️ Detailed Execution Steps

1. Trigger File Creation

The playbook performs a single, atomic operation to initiate the reset.

  • Target Location: /data/orionhealth/rhapsody/rhapsody/data/users/

  • File Name: ResetAdministratorPassword.action

  • Content: Empty string (The file's existence is the trigger; content is irrelevant).

  • Permissions:

    • Owner: rhapsody (Crucial, as the engine must have permission to read and delete the file after processing).

    • Mode: 0644.

2. The Rhapsody Mechanism

Once this file is placed:

  1. The Rhapsody Engine scans the users directory (usually during the startup sequence).

  2. It detects the ResetAdministratorPassword.action file.

  3. It resets the built-in administrator account password to the default (typically admin or password, depending on the Rhapsody version).

  4. It deletes the .action file to prevent the password from resetting again on subsequent restarts.

⚠️ Technical Notes & Constraints

  • Restart Requirement: The playbook provided does not restart the Rhapsody service automatically. The password reset will likely not take effect until the Rhapsody service is restarted manually or via a separate automation step.

  • Security Implication: This resets the password to a well-known default. It is imperative that the user logs in immediately after the reset and changes the password to a secure value.

  • Impact: This operation affects the primary local administrator account used for the Management Console and IDE access.