The suspendacct Script
Valid for versions 96 through the latest version
Version:
96
Last modified: August 6, 2024
Looking for this interface?
Your hosting provider can enable or disable this interface for resellers in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).
Overview
The /usr/local/cpanel/scripts/suspendacct
script lets you to suspend one cPanel account at a time from the command line. You can also use WHM’s Manage Account Suspension interface (WHM » Home » Account Functions » Manage Account Suspension) to suspend an account.
For more information about the effects of account suspension, read our What Happens When You Suspend an Account documentation.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/scripts/suspendacct [account] [options]
Options
Use the following options with this script:
Options |
Description | Example |
---|---|---|
account |
Required. The cPanel account that you want to suspend. You can only suspend one account at a time with this script. If you enter multiple accounts, the script will only suspend the first account.
Important:
|
username |
reason |
The reason for suspension, surrounded by quotes. The script adds the given reason to the account’s /var/cpanel/suspended/username file, where username is the account’s username. |
"Failure to pay monthly fee." |
disallow |
Whether to allow only the root user to unsuspend the account.
Important:
You must include the
reason option if you wish to use the disallow option.
|
disallow |
--child-ok |
Force the script to suspend a distributed cPanel account via a child node.
Warning:
You should always suspend accounts from the parent node. Only use this option in an emergency.
|
--child-ok |
--force |
Force the script to suspend the account, even if it is a suspended account. | --force |
--leave-ftp-accts-enabled |
Whether to skip suspension of the account’s FTP accounts.
Warning:
Enabling this option may cause security issues. We strongly recommend that you do not use it.
|
--leave-ftp-accts-enabled |
--help |
Display the help text for this script. | --help |
Example
The following example suspends the username
account and skips suspension of the account’s FTP accounts:
/usr/local/cpanel/scripts/suspendacct username "Failure to pay monthly fee." --leave-ftp-accts-enabled
The script’s output will resemble the following:
|
|