Command line option to list suspended accounts/domains – cPanel

In WHM/cPanel server there is an option to suspend a particular account/domain for a particular period. This option is very helpful to deactivate an account if we found any malicious activities like spamming, phishing etc from that account. Here I am explaining different ways to suspend, un-suspend and list suspended accounts in a server with cPanel.

How to suspend/unsuspend an account via WHM panel?

From the WHM control panel the server admin can simply manage the account suspension and re-activation. Here is the steps for suspending an account via WHM.

Step I : Login to WHM panel.Step II : Go to:

Home >> Account Functions >> Manage Account Suspension

From there you can select the account and suspend it simply. There is an option to add your note for suspension reason and also you can prevent re-sellers from un-suspending the account from their WHM panel. See the image below for more details.

You can also un-suspend an account from here.

How to suspend/unsuspend an account via command-line?

Back-end scripts are available to do the same in a WHM/cPanel server. We can simply suspend and un-suspend accounts via command-line using those cPanel scripts. Here I am listing those scripts for suspending and un-suspending cpanel accounts.

To suspend an account:

/scripts/suspendacct user-name

To unsuspend an account:

/scripts/unsuspendacct user-name

How to list suspended accounts from the WHM panel?

At the section where you managing the suspention of an account, you can see that already suspended account is shaded with red color. In WHM there is a direct option to list all suspended accounts. Do follow the below pasted steps for that.

Step I : Login to WHM panel.Step II : Go to:

Home >> Account Functions >> List Suspended Accounts

If you want, you can unsunpend accounts from there directly.

How to list suspended accounts from comman-line?

Here we goes to our topic “command line option to list suspended accounts/domains“. Yes, from the back-end we can simply list suspended accounts by accessing the directory “/var/cpanel/suspended/“. All suspended accounts will be listed there.

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!