How to Create a WHM Reseller Without an Associated Domain
Valid for versions 106 through the latest version
Version:
106
Last modified: January 26, 2024
Overview
You can create administrative user accounts in WHM that do not correspond to a cPanel account. These accounts allow a user, such as an employee, to access WHM without root access and perform similar tasks to a root
user.
If you create a reseller without a domain, certain parts of WHM will not function either when logged in as that user or when you attempt to perform actions that affect that user.
Use the WHM API 1 createacct
function to create a WHM reseller account without an associated domain
To quickly and easily create a WHM reseller account without an associated domain, you can use the WHM API 1 createacct
function.
-
Connect to the server via SSH as the
root
user. -
Call the WHM API 1
createacct
function. For example:whmapi1 createacct username=user password=password reseller_without_domain=1
Note:- In the example above,
user
represents the desired account username. - Make sure you include the
reseller_without_domain
parameter.
- In the example above,
-
Follow the URL in the output to edit the new account’s privileges. Alternatively, you can edit an account’s privileges using the WHM API 1
setacls
function.Warning:After creating the account using the API, it will not have any privileges added to it. You must add the privileges you want the account to have.
Manually create a WHM reseller account without an associated domain
To manually create a WHM reseller account without an associated domain, perform the following steps:
- In the steps below,
username
represents the desired account username. - You must select the desired permissions for your new reseller account.
- Connect to the server via SSH as the
root
user. - Create a new user with the following command:
useradd -Um username
- Set the new user’s password with the following command:
passwd username
- Set the permissions for the new user’s home directory with the following command:
chmod -v 711 /home/username
- Create an entry in the
/var/cpanel/resellers
file forusername
with the following command:echo "username:" >> /var/cpanel/resellers
- Check whether the
/var/cpanel/users/username
file exists.- If the file exists, open it in your preferred text editor. Remove the following line:
DNS=
- If the file does not exist, create it with the following commands:
1 2 3
echo USER=username > /var/cpanel/users/username chmod 0640 /var/cpanel/users/username chgrp username /var/cpanel/users/username
- If the file exists, open it in your preferred text editor. Remove the following line:
- Log in to WHM as the
root
user and navigate to WHM’s Edit Reseller Nameservers and Privileges interface (WHM » Home » Resellers » Edit Reseller Nameservers and Privileges). - Select username from the menu and click Submit.
- Select the checkboxes that correspond to the desired user permissions. Click Save to save these changes.
Change the password for a WHM reseller account without an associated domain
You cannot change the password for this account type using WHM’s Password Modification interface (WHM » Home » Account Functions » Password Modification) or List Accounts interface (WHM » Home » Account Information » List Accounts). The only way to change the password of this account type is using the following command:
passwd username
Use the WHM API 1 removeacct
function to remove a WHM reseller account without an associated domain
To quickly and easily remove a WHM reseller account without an associated domain, you can use the WHM API 1 removeacct
function.
- Connect to the server via SSH as the
root
user. - Call the WHM API 1
removeacct
function. For example:whmapi1 removeacct username=user
Note:In the example above,
user
represents the account username for the reseller account without an associated domain.
Manually remove a WHM reseller account without an associated domain
To manually remove a WHM reseller account without an associated domain, perform the following steps:
username
represents the account’s username.
- Connect to the server via SSH as the
root
user. - Remove the
/var/cpanel/users/username
file. - Remove the user file
username
in the/var/cpanel/users/
directory. To do this, run the following command:rm /var/cpanel/users/username
- Open the
/var/cpanel/resellers
file and remove theusername
user entry from the file. - Remove the user from the system with the following command:
userdel username
Known limitations for a WHM reseller account without an associated domain
Known limitations for this type of account include, but are not limited to:
- When logged in to WHM as a reseller account without an associated domain, the following interfaces will fail to load correctly:
- You cannot change the password for this account type using WHM’s Password Modification interface or List Accounts interface. The only way to change the password of this account type is by using the command line.
- This account type has no contact email account.
- Email notifications will not function on this account type.
- You cannot back up this account type with the
pkgacct
script. For more information about thepkgacct
script, read our The pkgacct Script documentation.
We recommend running /usr/local/cpanel/scripts/updateuserdomains
after creating a WHM reseller without an associated domain before using any WHM API calls.