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.

Warning:

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.

  1. Connect to the server via SSH as the root user.

  2. 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.

  3. 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:

Note:
  • In the steps below, username represents the desired account username.
  • You must select the desired permissions for your new reseller account.
  1. Connect to the server via SSH as the root user.
  2. Create a new user with the following command:
    useradd -Um username 
  3. Set the new user’s password with the following command:
    passwd username
  4. Set the permissions for the new user’s home directory with the following command:
    chmod -v 711 /home/username
  5. Create an entry in the /var/cpanel/resellers file for username with the following command:
    echo "username:" >> /var/cpanel/resellers
  6. 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 
  7. 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).
  8. Select username from the menu and click Submit.
  9. 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.

  1. Connect to the server via SSH as the root user.
  2. 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:

Note:
In the steps below, username represents the account’s username.

  1. Connect to the server via SSH as the root user.
  2. Remove the /var/cpanel/users/username file.
  3. Remove the user file username in the /var/cpanel/users/ directory. To do this, run the following command:
    rm /var/cpanel/users/username
  4. Open the /var/cpanel/resellers file and remove the username user entry from the file.
  5. 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:

Important:

We recommend running /usr/local/cpanel/scripts/updateuserdomains after creating a WHM reseller without an associated domain before using any WHM API calls.

Additional Documentation