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 a tarball install 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 package installs and install_location/bin for tarball installs.

    The default location of the old password file is /etc/opscenter/.passwd for package installs and install_location/conf/.passwd for tarball installs.

    The default location of the new password database is /etc/opscenter/passwd.db for package installs and install_location/passwd.db for tarball installs.

    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:
    • Package installations:
      $ sudo service opscenterd restart
    • Tarball installations:
      Find the OpsCenter process ID (pid), kill the process using its PID number, and start OpsCenter:
      $ ps -ef | grep opscenter
      $ sudo kill pid

      install_location/bin/opscenter (Use -f to start in the foreground.)

    • Windows installations:

      Restart the OpsCenter Service from the Control Panel.