Linux

Command to suspend/unsuspend an account via SSH in cPanel

To manage suspending and unsuspending accounts on cPanel via the command line, you can use the built-in scripts available on the cPanel server. This is an effective way to automate tasks or handle account management more efficiently.

Suspend an Account

/usr/local/cpanel/scripts/suspendacct username [reason] [--force]

 

  • username: The username of the cPanel account you want to suspend.
  • [reason]: The reason for suspending the account, this is an optional parameter.
  • --force: An option to force the suspension even if issues are encountered.

Example:

/usr/local/cpanel/scripts/suspendacct exampleuser "Non-payment" --force

This command will suspend the user exampleuser and note the reason as "Non-payment."

Unsuspend an Account

/usr/local/cpanel/scripts/unsuspendacct username
  • username: The username of the cPanel account that you want to suspend.

Example:

/usr/local/cpanel/scripts/unsuspendacct exampleuser

This command will temporarily suspend the user exampleuser.

Using these commands effectively can help you manage server activity more efficiently, either from the command line or within scripts.

Thanks for visit may website