Introduction
While managing a WHM/cPanel server, you may encounter a situation where a user forgets their webmail (email account) password but doesn’t have cPanel access to reset it. In such cases, the easiest method is to reset the email password directly through the server using SSH/CLI. This is fast, secure, and doesn’t require logging into the cPanel interface.
Prerequisites:
- SSH access to the server (root or sudo privileges).
- cPanel/WHM installed and running on the server.
- The email account (username@domain.com) we want to reset must already exist.
- Basic familiarity with Linux command-line operations.
Step1:
Login to your server via SSH as root
| $ ssh root@server-ip |
Step 2:
Use the following command structure.
| $ uapi –user=$CPANELUSER Email passwd_pop email=$EMAIL_NAME password=$NEW_PASSWORD |
- cPanel User:
example - Email Account:
info@example.com - New Password:
NewPass@123
Note: Make sure the new password meets the server’s password strength policy.
Conclusion:
Resetting a webmail password through WHM is not always possible if you don’t have access to the user’s cPanel account. In such cases, CLI proves to be a powerful and reliable solution. Using the UAPI command, administrators can quickly reset any email password securely without needing UI access. This method is ideal for rapid support actions and secure server management.