Moogsoft Docs

Change Passwords for Default Users

Moogsoft AIOps creates systems users for Linux, MySQL, and RabbitMQ during the installation process. As a security measure, you can change the password for these users. After you change the passwords for certain users, you must update Moogsoft AIOps configuration to use the new password.

If you run in a distributed environment, you can set unique passwords for all components on each host. Update the configuration files for a host to contain the password for user for the host.

Moogsoft recommends you encrypt passwords for use in Moogsoft AIOps configuration files. See Moog Encryptor. In distributed or high availability environments, encrypt the password using the Moog Encryptor on each machine.

Linux Users

The Moogsoft AIOps installation package creates the following Linux users with login privileges:

  • moogsoft

  • moogadmin

  • rabbitmq

  • tomcat

  • moogtoolrunner

Execute the passwd command to change the password Linux users. For example, to change the password for moogtoolrunner:

passwd moogtoolrunner
Update Configuration

After you change the password for moogtoolrunner, update its password in $MOOGSOFT_HOME/config/servlets.conf. For example:

# The toolrunner user password.
        # Use either toolrunnerpassword or toolrunnerpassword.
        toolrunnerpassword: "MyNewPassword"
        # encrypted_toolrunnerpassword: "rmW2daCwMyI8JGZygfEJj0MZdbIkUqX3tT/OIVfMGyI=",

Restart Apache Tomcat to apply the configuration change.

service apache-tomcat restart

Note

You do not need to update the Moogsoft AIOps configuration after you change the password for other Linux users with login privileges.

Other Linux Users

The Moogsoft AIOps installation package creates the following users without login privileges:

  • elasticsearch

  • mysql

  • nginx

MySQL User

The Moogsoft AIOps installation process creates a user to log in to MySQL: ermintrude. Execute the MySQL SET PASSWORD statement for the user ermintrude to change its password:

SET password FOR 'ermintrude'@'localhost'= PASSWORD('<new-password>');

If you are running in a distributed environment, update the password for the ermintrude user on all other nodes:

SET password FOR 'ermintrude'@'<host>'= PASSWORD('<new-password>');

Where <host> is the name of the remote server connecting to the database. For example, if you have the Moogsoft AIOps UI web components running on a separate host named "mywebserver":

SET password FOR 'ermintrude'@'mywebserver'= PASSWORD('MyNewPassword');

After you change the password for ermintrude, grant it priviliges on all the objects in the moogdb and moog_reference databases. For example:

GRANT ALL ON moogdb.* TO ermintrude@'localhost' IDENTIFIED BY '<new-password>';
GRANT ALL ON moog_reference.* TO ermintrude@'localhost' IDENTIFIED BY '<new-password>';

If you are running in a distributed environment, you must grant permissions for the ermintrude user on all nodes. For example:

GRANT ALL ON moogdb.* TO ermintrude@'<host>' IDENTIFIED BY '<new-password>';
GRANT ALL ON moog_reference.* TO ermintrude@'<host>' IDENTIFIED BY '<new-password>';

Where <host> is the name of the remote server connecting to the database. For example, if you have the Moogsoft AIOps UI web components runing on a separate host named "mywebserver":

GRANT ALL ON moogdb.* TO ermintrude@'my' IDENTIFIED BY 'MyNewPassword';

GRANT ALL ON moog_reference.* TO ermintrude@'<host>' IDENTIFIED BY 'MyNewPassword';

Update Configuration

After you change the password for ermintrude, update its password in $MOOGSOFT_HOME/config/system.conf. For example:

    "mysql" :
        {
            "host"            : "localhost",
            # The name of the moogdb database
            "moogdb_database_name"          : "moogdb",
            # The name of the moog_reference database
            "referencedb_database_name"     : "moog_reference",
            "username"        : "ermintrude",
            # "encrypted_password":"vQj7/yom7e5ensSEb10v2Rb/pgkaPK/4OcUlEjYNtQU=",
            "password"        : "MyNewPassword",

If you are running in a distributed environment, update the password configuration on every host.

RabbitMQ User

The Moogsoft AIOps installation process creates a RabbitMQ user called moogsoft. Execute the rabbitmqctl change_password command to change the password for moogsoft. For example:

rabbitmqctl change_password moogsoft <new-password>
Update Configuration

After you change the password for moogsoft, update its password in $MOOGSOFT_HOME/config/system.conf. For example:

      # By default the moogsoft username and password are used.
        # This needs to match the MooMS broker configuration. If
        # commented out a default "guest" user will be used.
        #
        "username"        : "moogsoft",
        "password"        : "MyNewPassword",
        # "encrypted_password" : "e5uO0LY3HQJZCltG/caUnVbxVN4hImm4gIOpb4rwpF4=",

If you are running in a distributed environment, update the password configuration on every host.