How to change the password of the WHM Root Account in WHM?
Log in to WHM, go to Server Configuration, select Change Root Password, enter a strong new password, and click Change Password. You can also update the root password via SSH using the passwd command. If you lose access, use the Virtualizor VNC console from your client area.
In WHM, go to Server Configuration: Change Root Password, enter and confirm a strong new password until the strength meter turns green, then click Change Password. This updates the Linux root account and your next WHM login will use the new root password.
Before you start
- Log in to WHM as root or a reseller with root privileges. The Change Root Password page is hidden otherwise.
- Make sure your new password meets the minimum strength set in WHM Security Center: Password Strength Configuration.
- Have a fallback login ready. Keep SSH access with a sudo-capable user or use the Virtualizor VNC console from the Hostworld client area to avoid lockout.
Step 1: Change the root password in WHM
- In WHM, open Home > Server Configuration > Change Root Password.
- Enter the new password in both fields. Aim for the strength meter to show green.
- Click Change Password. WHM updates the system root user without asking for the old password.
- Log out of WHM. Log back in at
https://your-server-hostname:2087/as root with the new password to confirm it works.
Note: This page changes only the system root user. To change an individual cPanel or reseller account password, use WHM > Account Functions > Password Modification or the user’s cPanel > Preferences > Password & Security.
Step 2: Or change the root password via SSH
This updates the Linux root user’s password from the terminal using the standard passwd utility.
AlmaLinux 9
# Change the current user's password when you are logged in as root
passwd
# If logged in as a sudo-capable user, set the root user's password
sudo passwd root
Ubuntu 24.04
# Change the current user's password when you are logged in as root
passwd
# If logged in as a sudo-capable user, set the root user's password
sudo passwd root
On cPanel DNSOnly servers there is no WHM interface for this task. Use SSH and run passwd as shown above.
If it does not work
- You cannot find “Change Root Password” in WHM: you are not logged in as root or your reseller account does not have permission to use it. Log in as root, or open a support ticket and we will check the privilege setting.
- WHM rejects your new password: it does not meet the configured strength. Increase length and variety until the meter is green. If you administer policy, adjust it in WHM > Security Center > Password Strength Configuration, then try again.
- Locked out of SSH or WHM after changing access settings: use the Virtualizor VNC console from the Hostworld client area to get a console session, then run
passwdfor root. If you cannot reach the console, open a support ticket.
What next
For context on password policies, the WHM interface, and when to use SSH instead, see our VPS guides. If you are planning wider server work on your Hostworld VPS, keep going in our VPS guides, or if you need a fresh server to rebuild on, see Linux VPS.
Common questions
Where do I change the root password in WHM?
Go to Home > Server Configuration > Change Root Password in WHM. Enter your new password in both fields and click Change Password.
Can I change the root password using SSH?
Yes. Log in via SSH and run passwd if you are root, or sudo passwd root if you are a sudo-capable user.
What if WHM rejects my new password?
Your password does not meet the configured strength requirements. Increase the length and character variety until the strength meter turns green, then try again.
What if I get locked out of WHM or SSH?
Use the Virtualizor VNC console from the Hostworld client area to access your server and run passwd for root. If you cannot reach the console, open a support ticket.
Does this change individual cPanel account passwords?
No. This changes only the system root user. To change a cPanel or reseller account password, use WHM > Account Functions > Password Modification or the user's cPanel > Preferences > Password & Security.
Was this article helpful?
0 people found this helpful