Skip to main content

View suspended accounts via SSH

Comments

4 comments

  • Havri
    Hello, I think you can check the following folder for each user file: ls -al /var/cpanel/suspended/ The users listed there should coincide with the list in WHM -> List Suspended Accounts. Regards.
    0
  • cPanelMichael
    Hello, You can use the following WHM API 1 function to list suspended accounts via the command line: WHM API 1 Functions - listsuspended - Software Development Kit - cPanel Documentation The full command is:
    whmapi1 listsuspended
    Thanks!
    0
  • Rehan_1990
    Hello, I think you can check the following folder for each user file: ls -al /var/cpanel/suspended/ The users listed there should coincide with the list in WHM -> List Suspended Accounts. Regards.

    Thanks for your replay. It was quite helping. My basic concern is to filter the suspended accounts which are moved to other server as we can see this in WHM. Is there any way to filter or see those account which are moved to other server in SSH/command line/Terminal.
    0
  • Havri
    Hello, Like cPanelMichael said, you can use the API commands from the SSH/Command Line:
    whmapi1 listsuspended
    After that, you can parse the output from the API command and look for the "reason:" part.
    [root@server1 suspended]# whmapi1 listsuspended --- data: account: - is_locked: 0 owner: owner1 reason: Overdue on Payment time: Mon May 8 09:28:31 2017 unixtime: '1494224911' user: suspendeduser1 - is_locked: 0 owner: owner1 reason: User transferred to another server. time: Wed Feb 15 20:30:00 2017 unixtime: '1487183400' user: suspendeduser2 metadata: command: listsuspended reason: OK result: 1 version: 1
    Alternatively, you can use the files in /var/cpanel/suspended/ and look into those files for the reason. For example, after a user is transferred to another server using the Transfer Tool, the file from /var/cpanel/suspended/ for that user contains the reason of the suspension:
    User transferred to another server.
    Good luck.
    0

Please sign in to leave a comment.