Migrating users to the new password database

Migrate user authentication in versions of OpsCenter prior to 5.0 to 5.0+ using the provided script.

Use the provided migration script when migrating user authentication between versions of OpsCenter prior to 5.1.
Note: The migration script is only required when migrating from OpsCenter versions pre-5.0 to 5.0+. For upgrading user authentication with Installer-No Services or tarball installations of OpsCenter 5.1 and higher, copy the passwd.db file as instructed in the Upgrade Guide.
The migrate_password_file.py script reads the users and passwords from the old password file and inserts them into the new password database.

When OpsCenter first starts up with authentication enabled, it creates an admin role. Before you migrate, you must create a user role. Existing users in the old password file are copied to one of these roles based on their previous role.

Prerequisites

To migrate your users and passwords, you must have file system access to the old password file.

Procedure

  1. Enable authentication in OpsCenter.
  2. Start OpsCenter so that the new password database is created.
  3. Create a role with the name user in OpsCenter.
  4. In a terminal, run the migrate_password_file.py script. The script takes two arguments: the path to the old password file, and the path to the new password database.

    The default location of the migrate_password_file.py script is /usr/share/opscenter/bin/ for Installer-Services or package installations and install_location/bin for Installer-No Services or tarball installations.

    The default location of the old password file is /etc/opscenter/.passwd for Installer-Services or package installations and install_location/conf/.passwd for tInstaller-No Services or tarball installations.

    The default location of the new password database is /etc/opscenter/passwd.db for Installer-Services or package installations and install_location/passwd.db for Installer-No Services or tarball installations.

    For package installs:

    $ cd /usr/share/opscenter/bin
    $ sudo ./migrate_password_file.py /etc/opscenter/.passwd /etc/opscenter/passwd.db

    For tarball installs:

    $ cd install_location/bin
    $ sudo ./migrate_password_file.py install_location/conf/.passwd install_location/passwd.db
  5. Restart OpsCenter.