There was a problem loading the comments.

How to count how many users exist currently on the server?

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

The following error occurs during Imunify360 registration or installation:

WARNING: License is invalid for current server
WARNING: License is invalid for this server
Registration was not successful. Exiting.

Imunify360 requires a different license type based on the number of users registered on the server.
How can I count how many users currently exist on the server?

Environment

  • cPanel
  • Imunify360
  • Plesk
  • DirectAdmin
  • CyberPanel
  • No hosting panel systems
  • CLN

Resolution

  • cPanel

    To count users, run the following command:

    # cut -d":" -f1 /etc/userplans | sort -n | uniq | wc -l

    Also, it may be useful to list users. To do so, run the following command:

    # cut -d":" -f1 /etc/userplans | sort -n | uniq
  • Plesk

    To count users, run the following command:

    # plesk db "SELECT COUNT(DISTINCT cl_id) FROM domains"
  • DirectAdmin

    To count users, run the following command:

    # cut -d":" -f2 /etc/virtual/domainowners | sort -n | uniq | wc -l

    Also, it may be useful to list users. To do so, run the following command:

    # cut -d":" -f2 /etc/virtual/domainowners | sort -n | uniq
  • No hosting panel systems

    To count users, run the following command:

    # cat /etc/passwd

    By default, Imunify360 will use Linux system users, limited by uid_min and uid_max from the /etc/login.defs.

  • CyberPanel

    You can check the number of users as well as on the server without the control panel. CyberPanel creates a new user for each "website", and doesn't create a user for additional "domain" inside "website".

The number of users matches the license.

If the number of users matches the license, but registration fails due to an error, it is necessary to run the command:

# imunify360-agent update-license

And then register the server again.


Share via
Did you find this article useful?  

Related Articles

© CPLicense.Net