The default password policy on RHEL 9 enforces that the password should be a minimum 8 characters and a maximum 128 characters. Password should consist of a mixture of a minimum of three uppercase, lowercase, numbers, and non-alphanumeric characters (!@#$%^&*()_+-={}[]|’).
In this post, we are exploring the ways to change user passwords on Red Hat Enterprise Linux 9.
Prerequisites
- RHEL instance
- Root account or an account with sudo privileges
Changing User Password from Command Line
Open up the terminal from the activities menu. Execute the following command if you want to change your own password.
passwd
Type the current password and new password twice and hit <Enter key> from the keyboard.
When you type the password nothing displays on the terminal from the security point of view.
Now suppose you want to change the password of user ‘tony’, the command is as follows.
sudo passwd tony
Changing User Password from GUI
Step 1: On the dashboard, click the upper right corner and then click settings.
Step 2. Choose ‘Users’ and select the account you wish to change its password. Click Unlock.
Step 3. Submit your password and click Authenticate.
Step 4. Click Password.
Step 5. Provide your current password and new password twice for confirmation. Both passwords should match.
Conclusion
You have learned to change passwords both using GUI and terminal. If you have any queries, submit a comment and we will respond.