This guide covers creating and removing a WHM reseller account without linking it to a specific domain. Following these steps, you can manage reseller accounts without impacting your cPanel license limit.
Why You Might Need a WHM Reseller Account Without a Domain
Creating a WHM reseller account without an associated domain is a specialized setup that can be quite useful in certain scenarios. Here are some common reasons why you might need this configuration:
- Testing or Development Purposes: If you need to test configurations, permissions, or new WHM features, creating a reseller account without a domain allows for a controlled environment that doesn't interfere with live websites.
- Account Preparation: This setup allows you to create a reseller account for a client before they have a registered domain. The client can configure their account in advance, making onboarding smoother once their domain is ready.
- Limited Access Resellers: Sometimes, resellers only need access to specific features (such as email or sub-account management) and don't require a domain. This type of account allows you to provide necessary privileges without needing a full website setup.
- Efficient License Management: Accounts created with this method do not count toward the cPanel license's user limit. This setup is ideal if you need to manage users with reseller privileges while avoiding impact on license quotas.
By following the guide's steps, you can create and manage these domain-less reseller accounts effectively. However, it's important to note that this is a non-standard setup and should only be used in scenarios like those listed above to avoid unnecessary configuration issues.
Disclaimer: Always perform these steps in a test environment first and refer to the latest cPanel documentation for updates.
Creating a WHM Reseller Account Without a Domain
To get started, access your server's command line as the root user, either through SSH or by using the "Terminal" in WHM.
-
Create the Reseller Account
Run the WHM API's
createacctcommand to set up the reseller account:whmapi1 createacct username=$user password=$password reseller_without_domain=1This account won't count against your cPanel license limit.
-
Troubleshoot Login Errors
If you encounter an error when trying to log in to WHM, such as:
Could not create Locale handle: Failed to load testreseller's config file! (errno=)This error, related to case CPANEL-35056, can be resolved as follows:
- Create a
/var/cpanel/users/$reselleruserfile:
- Create a
touch /var/cpanel/users/$reselleruser- Add the following content to the file:
# cPanel -- If you edit this file directly you must run /usr/local/cpanel/scripts/updateuserdomains afterwards to rebuild the system caches. LOCALE=en- Run the command to update user domains:
/usr/local/cpanel/scripts/updateuserdomains -
Legacy Method: Creating a Reseller Without a Domain
This method provides additional flexibility for advanced users.
Steps
- Create a new user:
adduser username- Set a password for the user:
passwd username- Adjust permissions for the user's home directory:
chmod -v 711 /home/username- Create a reseller entry in
/var/cpanel/resellers:
- Create a reseller entry in
echo "$RESELLER:all" >> /var/cpanel/resellers- Edit the
/var/cpanel/users/usernamefile and remove anyDNS=entry:
- Edit the
sudo vi /var/cpanel/users/username- Configure privileges in WHM:
- Login to WHM as
root. - Navigate to WHM > Resellers > Edit Reseller Nameservers and Privileges.
- Select the new user and set permissions as needed.
- Login to WHM as
-
Create an Unmanaged DNS Zone (Optional)
If
/var/cpanel/users/systemdoes not exist, create a DNS zone:/scripts/adddns --domain $DOMAINCopy the file and remove the
DNS=entry:cp /var/cpanel/users/system /var/cpanel/users/$RESELLERThen, delete the DNS zone:
/scripts/killdns $DOMAINFinally, update user domains:
/usr/local/cpanel/scripts/updateuserdomains
Removing a WHM Reseller Account Without a Domain
-
Connect via SSH
Log in as the root user.
-
Remove the Reseller from Config Files
Open
/var/cpanel/users/resellersand remove theusernameentry.Delete the
/var/cpanel/users/usernamefile:rm /var/cpanel/users/username -
Remove User from
/var/cpanel/resellersEdit
/var/cpanel/resellersand remove the user entry. -
Delete the System User
Remove the system user with:
userdel username
Additional Notes
- Always verify updates from the latest cPanel documentation.
- Run tests in a staging environment first to avoid disruptions.