How to change root password on RHEL ( Red Hat Enterprise Linux)

To change the root password on Red Hat Enterprise Linux (RHEL), you can use the passwd command. This command allows you to change the password for the current user (in this case, the root user).

Here’s how you can use the passwd command to change the root password:

  1. Log in to your system as the root user or use sudo to temporarily elevate your privileges.
  2. Type the following command in the terminal:
 
$ passwd
  1. You will be prompted to enter and confirm the new password.
 
Changing password for user root.
New password:
Retype new password:
  1. Once you have entered the new password and confirmed it, the password change will be processed. If the new password meets the security requirements, the password will be changed, and you will be returned to the command prompt. (evercoach.com)

Note: You may need to enter the password twice because the system uses double-blind password input to prevent password snooping.

After changing the root password, make sure to log out and log back in with the new password to ensure that it works as expected.

Leave a Comment