- Created by Documentation, last modified on Apr 09, 2018
Description
This function suspends a reseller account.
Warning:
This function also suspends all of the cPanel accounts that the reseller owns.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/suspendreseller?user=username&reason=Nonpayment
https://hostname.example.com:2087/cpsess##########/xml-api/suspendreseller?user=username&reason=Nonpayment
whmapi0 suspendreseller user=username reason=nonpayment
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 0 documentation or run the
whmapi0 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi0
command:/usr/local/cpanel/bin/whmapi0
{ "output":"Changing Shell to /bin/false...Changing shell for username.\nWarning: \"/bin/false\" is not listed in /etc/shells.\nShell changed.\nDone\nLocking Password...Locking password for user username.\npasswd: Success\nDone\n1Suspending email account logins for username.tld .... Done\nSuspending mysql users\nUsing Universal Quota Support (quota=0)\nSuspending websites...\nUsing Universal Quota Support (quota=512000)\nSuspending FTP accounts...\nUpdating FTP passwords for username\nFTP password files updated.\nFTP vhost passwords synced\nusername's account has been suspended\n\nChanging Shell to /bin/false...Changing shell for noftp.\nWarning: \"/bin/false\" is not listed in /etc/shells.\nShell changed.\nDone\nLocking Password...Locking password for user noftp.\npasswd: Success\nDone\n1Suspending mysql users\nUsing Universal Quota Support (quota=0)\nSuspending websites...\nUsing Universal Quota Support (quota=5120)\nSuspending FTP accounts...\nUpdating FTP passwords for noftp\nFTP password files updated.\nFTP vhost passwords synced\nnoftp's account has been suspended\n", "result":[ { "statusmsg":"Finished suspending reseller.", "status":1 } ] }
<suspendreseller> <output> Changing Shell to /bin/false...Changing shell for username. Warning: "/bin/false" is not listed in /etc/shells. Shell not changed. Done Locking Password...Locking password for user username. passwd: Success Done 1Suspending email account logins for username.tld .... Done Suspending mysql users Account previously suspended (password was locked). Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=512000) Updating FTP passwords for username FTP password files updated. FTP vhost passwords synced username's account has been suspended Changing Shell to /bin/false...Changing shell for noftp. Warning: "/bin/false" is not listed in /etc/shells. Shell not changed. Done Locking Password...Locking password for user noftp. passwd: Success Done 1Suspending mysql users Account previously suspended (password was locked). Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=5120) Updating FTP passwords for noftp FTP password files updated. FTP vhost passwords synced noftp's account has been suspended </output> <result> <status>1</status> <statusmsg>Finished suspending reseller.</statusmsg> </result> </suspendreseller>
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
user | string | Required The reseller's username. | A valid reseller username on the server. | username |
reason | string | The reason for the reseller's suspension. Note: We strongly recommend that you always include a reason for suspension. | A valid string. | Nonpayment |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
output | string | Output from the function's action. | One or more valid strings. Note: This output may contain HTML. | Click to view... Changing Shell to /bin/false...Changing shell for username. Warning: "/bin/false" is not listed in /etc/shells. Shell not changed. Done Locking Password...Locking password for user username. passwd: Success Done 1Suspending email account logins for username.tld .... Done Suspending mysql users Account previously suspended (password was locked). Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=512000) Updating FTP passwords for username FTP password files updated. FTP vhost passwords synced username's account has been suspended Changing Shell to /bin/false...Changing shell for noftp. Warning: "/bin/false" is not listed in /etc/shells. Shell not changed. Done Locking Password...Locking password for user noftp. passwd: Success Done 1Suspending mysql users Account previously suspended (password was locked). Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=5120) Updating FTP passwords for noftp FTP password files updated. FTP vhost passwords synced noftp's account has been suspended |
| array of hashes | An array of hashes of function output. | This hash includes the status and statusmsg returns. |
|
| Boolean | Whether the function succeeded. The function returns this value in the |
| 1 |
| string | A message of success or a reason for failure. The function returns this value in the |
| Finished suspending reseller. |
Function information
API Version:
WHM API 1 Equivalent:
Important:
We strongly recommend that you use WHM API 1. WHM API 0 is deprecated.
Available in:
WHM 11+
Methods:
GET, POST
Required Parameters:
user
Return Formats:
About WHM API 0
Warning:
WHM API 0 is deprecated. We strongly recommend that you use the equivalent WHM API 1 function instead.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 0 Sections - Resellers — Reseller functions allow you to manage Reseller accounts and their settings.
-
Page:WHM API 0 Functions - acctcounts — This function lists a reseller's total accounts, suspended accounts, and account creation limit.
-
Page:WHM API 0 Functions - getresellerips — This function lists a reseller's available IP addresses.
-
Page:WHM API 0 Functions - listacls — This function lists the reseller's Access Control Lists (ACLs) and each list's privileges.
-
Page:WHM API 0 Functions - listresellers — This function lists the reseller accounts on the server.