Updated on 2025-08-09 GMT+08:00

Changing the Passwords for OS Users of an MRS Cluster Node

This section describes how to periodically change the login passwords for the OS users omm, ommdba, and root on MRS cluster nodes to improve system O&M security. You do not need to set a unified password for the OS users on each node.

By default, the password validity period of an OS user is 90 days. Changing the MRS OS User Password Validity Period describes how to change the validity period.

You are advised to periodically change a user's login password of the cluster node operating system to improve system O&M security.

Prerequisites

  • You have obtained the IP address of the node where the passwords of users omm and ommdba are to be changed.
  • You have obtained the password of user root before changing the passwords of users omm and ommdba.

Changing the Password of the OS User of an MRS Cluster Node

  1. Log in to the node that requires password change as user root.
  2. Run the following command to switch the user:

    sudo su - root

  1. Run the following command to change the passwords of users omm, ommdba, or root:

    passwd omm

    passwd ommdba

    passwd root

    For example, after you run the command to change the password of user omm, the following information is displayed:

    Changing password for user omm.
    New password:
    Retype new password:

    Enter the new password and confirm the password. The password change policies for an OS vary according to the OS that is used.

    The default password complexity requirements of the MRS cluster are as follows:

    • The password must contain at least eight characters.
    • The password must contain at least three types of the following: uppercase letters, lowercase letters, digits, spaces, and special characters ('~!@#$%^&*()-_=+\|[{}];:'",<.>/?).
    • The new password cannot be the same as last five historical passwords.

Changing the MRS OS User Password Validity Period

  1. Log in to the node where you want to change the password validity period of the OS user password as the root user.
  2. Change the OS user password validity period.

    • Legacy users

      Run the following command to change the password validity period:

      chage -MValidity period (days) user_name

      • Validity period (days): how many days the password is valid since its creation. If this parameter is set to 99999, the password never expires. Set this parameter based on the site requirements.
      • user_name: OS user whose validity period you want to change, for example, ommdba.
      • You are advised to set this parameter based on service demands and periodically change the user password.
    • New users

      Run the following command to edit the file and change the value of PASS_MAX_DAYS, which indicates the password validity period, in days. If the value is changed to 99999, the password never expires.

      vi /etc/login.defs