cPanelResources

Tutorial FAQ: How can I find cPanel accounts on my server that are not integrated with WHMCS?

Question: How can I identify any cPanel account on my server that is not connected to my WHMCS billing ID?

Answer: You can use the steps below to generate a list of any cPanel account on the server without an integration link to WHMCS:

1. Log in to your server as the root user via SSH.

2. Enter the following command:

Code:
for cpuser in $(whmapi1 listaccts |awk '/user:/ {print $2}'); do apicheck=$(whmapi1 list_integration_links user="${cpuser}" | grep 'app: WHMCS'); if [[ -z "${apicheck}" ]]; then echo "${cpuser}"; fi; done
3. A list of every cPanel account on the server without a WHMCS integration link will appear in the command's output. For example:

Code:
# for cpuser in $(whmapi1 listaccts |awk '/user:/ {print $2}'); do apicheck=$(whmapi1 list_integration_links user="${cpuser}" | grep 'app: WHMCS'); if [[ -z "${apicheck}" ]]; then echo "${cpuser}"; fi; done
user123
user456
user789
In this example, user123, user456, and user789 represent cPanel accounts without WHMCS integration links.

4. For information on how to import existing cPanel accounts into the WHMCS accounting ecosystem, see the following WHMCS document:

CPanel/WHM Import - WHMCS Documentation

Additional Questions/Feedback
Feel free to click on the Discussion tab to let us know if you have any questions or feedback about the information in this tutorial.
Author
cPanelResources
Views
4,547
First release
Last update
Rating
0.00 star(s) 0 ratings