Changing the install owner for a root owned Data Aggregator installation

book

Article ID: 225658

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

Can I change the owner of the files under /opt/CAPM/IMDataAggregator to a service account? We don't have root access to the servers  unless requested.

How to change the owner of a Data Collector installation from a root user to a non-root user?

Cause

Installed as root user but root user access was revoked and requires special permission on a case by case basis.

Environment

All supported DX NetOps Performance Management releases

Resolution

Before changing the install owner to a non-root sudo-root user, it is required that the new user be properly configured to manage the installation. The steps to configure the user for proper sudo rights access are found on the Prepare to Install the Data Aggregator documentation page.

The safest way to change the ownership is to backup the Data Aggregator files mentioned in our Back Up the Data Aggregator documentation. Then re-install the DA providing the new username when prompted during install. After the instal completes follow the Restore the Data Aggregator documentation to restore the backed up files. Be sure the restored files are owned by the new install owner.

If a reinstall is not an option these are the steps to change the ownership. It is strongly recommended to ensure a solid backup of the DA is followed for use in restoration if needed.

Default paths used where shown.

  1. Stop all services.
    1. Non Fault Tolerant: dadaemon and activemq only
    2. Fault Tolerant also stop the consul and consul-ext services
  2. Run the following command:
    1. chown -R NewUserName.Group /opt/IMDataAggregator
  3. If HA/FT DAs run the following:
    1. chown -R consul /opt/IMDataAggregator/consul /opt/IMDataAggregator/consul-ext
  4. Edit the /etc/DA.cfg file.
    1. Change the entry for da.user=root to da.user=NewUserName
  5. Edit the /opt/IMDataAggregator/scripts/dadaemon file.
    1. Find any comparison or command with "root" and change to "NewUserName"
  6. Edit the /opt/IMDataAggregator/scripts/activemq file.
    1. Find any comparison or command with "root" and change to "NewUserName"
  7. On RHE7 (and equivalents)
    1. Edit the /etc/systemd/system/dadaemon.service file.
      1. Find the "[Service]" section.
      2. Add the following line with the new user if not present.
        1. User=NewUserName
    2. Edit the /etc/systemd/system/activemq.service file.
      1. Find the "[Service]" section.
      2. Add the following line with the new user if not present.
        1. User=NewUserName
  8. Restart all services.