The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get the total amount of accounts in shell

Discussion in 'General Discussion' started by CoolMike, Mar 16, 2007.

  1. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    I need a command which tells me how much accounts are on a whm server. If such a command is not existing, a shell script would be also a good solution.

    Hope someone can help me.

    Michael
     
  2. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    cat /etc/passwd |wc -l
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This will show the total number of users on the server, probably some with less meaning (i.e. root, nobody, mailnull, cpanel, mysql, etc).

    To find the total number of cpanel users on the server via shell:

    find /var/cpanel/users -type f -print | wc -l
     
  4. shivinvijai

    shivinvijai Member

    Joined:
    Mar 1, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The command to tell the total accounts in a server

    Hi,

    Its better to use /scripts/updateuserdomains first then use the command

    wc -l /etc/trueuserdomains

    will list the number of accounts in the server. If you need a scripts please update me.

    Thanks,
     
  5. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for all the answers, works perfect!

    Michael
     
Loading...
Similar Threads - total amount accounts
  1. vagkaefer
    Replies:
    2
    Views:
    377

Share This Page