Biblioteca de cunoștințe

The suspendacct Script  Tipărire

Overview:

The /usr/local/cpanel/scripts/suspendacct script allows you to suspend an account from the command line.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/suspendacct user ["reason"] [disallow] [--help]

Options

Use the following options with this script:

Options Description Example
user The account that you wish to suspend.
Important:
You cannot suspend a reserved username (for example, root or nobody.)
cpaneluser
reason The reason for suspension, surrounded by quotes. /usr/local/cpanel/scripts/suspendacct cpaneluser "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.
/usr/local/cpanel/scripts/suspendacct cpaneluser "failure to pay monthly fee." disallow
--leave-ftp-accts-enabled Whether to skip suspension of the account’s FTP accounts.
Warning:
Enabling this option may cause security issues and we strongly recommend that you do not use it.
/usr/local/cpanel/scripts/suspendacct cpaneluser --leave-ftp-accts-enabled
--help Displays the help text for this script. /usr/local/cpanel/scripts/suspendacct cpaneluser --help

Success and failure

If the function does not succeed because you entered a user that does not exist on the server, you will receive the following error message:

Invalid user

If the function succeeds, you will receive confirmation from the command line. The output will resemble the following text:

1
2
3
4
5
6
7
8
Changing Shell to /bin/false...Done
Locking Password...Done
Suspending email account logins for example.com .... Done
Suspending mysql users
Suspending websites...
Suspending FTP accounts...
Suspending outgoing email....Done
example's account has been suspended

Răspunsul a fost util?

Articole similare

WHM Scripts
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
The dbmaptool Script
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
The servers_queue Script
Overview: This script allows you to manage the task queue system. The task queue system allows...
The auto-adjust-mysql-limits Script
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
The autossl_check Script
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...