Migrating users to the new password database

User authentication in versions of OpsCenter prior to 5.0 can be migrated using the provided script.

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 will be 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 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_locationbin 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 password database is /etc/opscenter/passwd.db for package installs and install_location/conf/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/conf/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 then start the 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.