Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to See a List of Accounts on Your VPS

This guide shows you easy ways to list the user accounts on your VPS, both in WHM and from the command line. You need admin access.

VPS and Cloud Servers2 min read12 steps

What is an account?

An account is a space on the server that belongs to one user. It has a name, a password and its own files. Some accounts belong to real people. Others belong to programs that run in the background, called system users.

Method 1: Use WHM

WHM is the admin screen of a cPanel server. Use this method if your VPS has WHM.

  1. Log in to WHM. Use your server IP or hostname followed by :2087.
  2. Type List Accounts in the search box at the top left.
  3. Click List Accounts.
  4. Read the table. It shows the domain, user name, IP address, disk use, plan and the date each account was made.
  5. Use the search box on that page to find one account.

Method 2: Use the command line

The command line is a text screen where you type commands. Connect with SSH first. SSH is a safe way to control a server from far away.

  1. Log in over SSH as root.
  2. To see every user on the system, run:
    cut -d: -f1 /etc/passwd
    This prints the first part of each line in the user file, which is the user name.
  3. To see only normal users, run:
    awk -F: '$3 >= 1000 && $3 != 65534 {print $1}' /etc/passwd
    Normal users have an ID number of 1000 or more on most modern systems. On very old systems the limit is 500.
  4. To list the home folders, run:
    ls /home
  5. To see who is logged in right now, run:
    who

Method 3: List cPanel accounts by command

  1. On a cPanel server, log in as root over SSH.
  2. Run:
    whmapi1 listaccts
    This prints the full list of cPanel accounts. A shorter way is ls /var/cpanel/users.
Tip: Check the list now and then. If you see a user you do not know, it may be a sign that someone broke in. Change your passwords and contact Hostvento support.

Warning: do not delete system users. Removing the wrong one can stop services from working.

Quick recap

  • In WHM, open List Accounts.
  • From SSH, cut -d: -f1 /etc/passwd lists all users.
  • ls /home shows home folders.
  • On cPanel, ls /var/cpanel/users lists accounts.
  • Look out for unknown users.