How to Change a cPanel Account Owner from Reseller to Root via SSH
Need to move a cPanel account from a reseller’s ownership to the server administrator? You can change its owner to rootthrough SSH or WHM Terminal using the whmapi1 modifyacct command.
This guide explains how to check the current owner, change ownership, and verify the result. We use tellerho as the example cPanel username. Replace it with the account you want to update.
What does changing the cPanel account owner mean?
In WHM, a cPanel account can belong to root or a reseller. Ownership determines which reseller can see and manage that account.
Changing its owner to root places it under the server administrator’s ownership. A reseller with ordinary reseller privileges will no longer see it as an owned account.
The cPanel account keeps its own username. Making root its owner does not give that cPanel user root access to the server.
Before you begin
You need:
- A server running cPanel & WHM.
- Authorized root access through SSH or WHM Terminal.
- The exact cPanel username of the account you want to update.
Use the cPanel username, rather than the domain name or the reseller’s username.
If you only have shared hosting access or restricted reseller permissions, ask your server administrator or hosting provider to perform the change.
Step 1: Connect through SSH or open WHM Terminal
Choose either method below.
Option A: Connect through SSH
Open your SSH client or computer’s Terminal application and run:
ssh [email protected]
Replace server.example.com with your server’s hostname or IP address.
If your server uses a custom SSH port, specify it with -p:
ssh -p 2222 [email protected]
Use your actual SSH port; 2222 is only an example. Authenticate using your configured SSH key or password.
If direct root SSH login is disabled, use your existing authorized administrator login and approved method of obtaining a root shell, or use WHM Terminal.
Option B: Open Terminal inside WHM
- Log into WHM as root.
- Search for Terminal.
- Open Server Configuration → Terminal.
- Accept the notice if it appears.
Use Terminal in your root WHM session. The Terminal inside an ordinary cPanel account runs with that account’s permissions.
Step 2: Confirm you are running as root
Run:
whoami
For this procedure, the expected output is:
root
If another username appears, switch to your authorized root session before continuing.
Step 3: Check the account’s current owner
Request the account summary:
/usr/local/cpanel/bin/whmapi1 accountsummary user=tellerho
The accountsummary function retrieves information about the specified cPanel account.
Confirm that the returned account is the one you intend to update. Find its owner value and record the existing owner’s username.
For example:
owner: existingreseller
This is illustrative output. Your server will show the account’s actual owner.
If the account cannot be found, check that you are connected to the correct server and have entered the correct cPanel username.
Step 4: Change the cPanel account owner to root
Run:
/usr/local/cpanel/bin/whmapi1 modifyacct user=tellerho owner=root
Here is what each part means:
| Command component | Purpose |
|---|---|
/usr/local/cpanel/bin/whmapi1 |
Runs WHM API 1 from the command line. |
modifyacct |
Updates the specified cPanel account. |
user=tellerho |
Identifies the account to update. |
owner=root |
Sets the account’s WHM owner to root. |
The owner parameter accepts a new owner’s username or root. For another account, replace tellerho with its cPanel username.
This command targets one account. It does not reassign every account belonging to the previous reseller.
Step 5: Verify that ownership changed successfully
Review the command’s response. A successful result commonly includes metadata like this:
metadata:
command: modifyacct
reason: Account Modified
result: 1
version: 1
This is an abbreviated example. Review any messages or warnings in your actual response. A result value of 1 indicates success; 0 indicates failure.
Now request the account summary again:
/usr/local/cpanel/bin/whmapi1 accountsummary user=tellerho
The owner should now be:
owner: root
Checking the account again confirms the resulting ownership instead of relying only on the modification response.
Step 6: Confirm the account in WHM
While logged into WHM as root:
- Open Account Information → List Accounts.
- Locate the cPanel account.
- Confirm that its owner is root.
You can also open Account Functions → Modify an Account, select the account, and inspect its Account Ownersetting.
Finish by checking that the account’s website and cPanel access behave as expected.
Troubleshooting common problems
“whmapi1: command not found”
Use the full executable path:
/usr/local/cpanel/bin/whmapi1
Also confirm that you are connected to the cPanel server. cPanel documents both the short command and this absolute path for running WHM API 1.
Permission or authorization error
Run whoami and confirm that your session is running as root. An ordinary cPanel shell does not provide the server administrator permissions required for this procedure.
The account cannot be found
Confirm that:
- You entered the cPanel username correctly.
- You are connected to the server hosting that account.
- You used the account username rather than its domain name.
The API reports “result: 0”
Read the accompanying reason, messages, and warnings. Address the reported cause before retrying.
Some command-line failures can print an error without returning normal API metadata, so read the complete response.
SSH will not connect
Check the hostname, configured SSH port, and permitted access. If root WHM access works, use WHM Terminal to run the command. Incorrect ports, firewall restrictions, and an unavailable SSH service are possible connection causes.
How to change the owner back to a reseller
To reverse the change, use the same API function with the intended reseller’s username:
/usr/local/cpanel/bin/whmapi1 modifyacct user=tellerho owner=existingreseller
Replace existingreseller with the valid reseller account that should own and manage the account.
If you are restoring the previous arrangement, use the owner recorded in Step 3. Run the account summary command again to verify the result.
Frequently asked questions
Can I change a cPanel account owner using WHM Terminal?
Yes. Log into WHM as root, open Terminal, and run the same command you would use through SSH.
Is WHM account ownership the same as Linux file ownership?
No. This procedure changes the owner recorded by cPanel & WHM. Linux chown changes filesystem ownership and is a different operation.
Use the WHM API command when reassigning a cPanel account between WHM owners.
Will this move the account to another server?
No. The account stays on its current server. Moving its files, databases, and email to another server requires a separate migration.
Does changing the owner remove reseller privileges?
Account ownership and reseller privileges are separate settings. This command does not request removal of reseller privileges or reassign other accounts that the account owns.
Can a regular reseller move an account to root?
This procedure requires root privileges. If your reseller account has restricted permissions, contact the server administrator.
Need help with cPanel account management?
If you host with HoganHost and need an account ownership change, contact support with the cPanel username and intended owner. Our team can review your request and assist.



