Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function unsuspends a reseller account.

Warning:

This function also unsuspends all of the cPanel accounts that the reseller owns. 

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/unsuspendreseller?user=username
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/unsuspendreseller?user=username
 Command Line
whmapi0 unsuspendreseller user=username

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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "output":"Changing shell for username.\nShell changed.\nUnlocking password for user username.\npasswd: Success\nUnsuspending email account logins for username.tld .... Done\n[2014-11-26 15:50:33 -0600] warn [unsuspendacct] Failed to regenerate list using savelist: Importing savelist...\nRunning savelist.savelist()...\nLoading list /usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld (locked)\nTraceback (most recent call last):\n  File \"/usr/local/cpanel/3rdparty/mailman/bin/withlist\", line 299, in <module>\n    main()\n  File \"/usr/local/cpanel/3rdparty/mailman/bin/withlist\", line 277, in main\n    r = do_list(listname, args, func)\n  File \"/usr/local/cpanel/3rdparty/mailman/bin/withlist\", line 195, in do_list\n    m = MailList.MailList(listname, lock=LOCK)\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 128, in __init__\n    self.Lock()\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 165, in Lock\n    self.Load()\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 663, in Load\n    dict, e = self.__load(file)\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 628, in __load\n    fp = open(dbfile)\nIOError: [Errno 13] Permission denied: '/usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld/config.pck'\n at /usr/local/cpanel/Cpanel/Mailman/ListManager.pm line 34\n\tCpanel::Mailman::ListManager::__ANON__() called at /usr/local/cpanel/Cpanel/AccessIds.pm line 105\n\tCpanel::AccessIds::__ANON__() called at /usr/local/cpanel/Cpanel/ForkSync.pm line 122\n\tCpanel::ForkSync::__ANON__() called at /usr/local/cpanel/Cpanel/ForkSync.pm line 46\n\tCpanel::ForkSync::try {...} () called at /usr/local/cpanel/Cpanel/CPAN/Try/Tiny.pm line 119\n\teval {...} called at /usr/local/cpanel/Cpanel/CPAN/Try/Tiny.pm line 108\n\tCpanel::CPAN::Try::Tiny::try(CODE(0x9bdd234), Try::Tiny::Catch=REF(0x9bd7d1c)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 51\n\tCpanel::ForkSync::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 36\n\teval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 36\n\tCpanel::ForkAsync::do_in_child(CODE(0x9bb71a8)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 56\n\tCpanel::ForkSync::new('Cpanel::ForkSync', CODE(0x9bdd554)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 125\n\tCpanel::ForkSync::do_in_child(CODE(0x9bdd568)) called at /usr/local/cpanel/Cpanel/AccessIds.pm line 108\n\tCpanel::AccessIds::do_as_user_group('mailman', undef, CODE(0x9bdcce4), 'mailman', CODE(0x9bdcce4)) called at /usr/local/cpanel/Cpanel/AccessIds.pm line 70\n\tCpanel::AccessIds::do_as_user('mailman', CODE(0x9bdcce4)) called at /usr/local/cpanel/Cpanel/Mailman/ListManager.pm line 51\n\tCpanel::Mailman::ListManager::regenerate_list('/usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld') called at /usr/local/cpanel/scripts/unsuspendacct line 213\n\tscripts::unsuspendacct::run('username') called at /usr/local/cpanel/scripts/unsuspendacct line 35\nUnsuspending websites...\nUnsuspending FTP accounts...\nUpdating FTP passwords for username\nFTP password files updated.\nFTP vhost passwords synced\nusername's account is now active\nUnsuspending mysql users\nusername's account has been unsuspended\n\nChanging shell for noftp.\nShell changed.\nUnlocking password for user noftp.\npasswd: Success\nUnsuspending websites...\nUnsuspending FTP accounts...\nUpdating FTP passwords for noftp\nFTP password files updated.\nFTP vhost passwords synced\nnoftp's account is now active\nUnsuspending mysql users\nnoftp's account has been unsuspended\n",
   "result":[  
      {  
         "statusmsg":"Finished unsuspending reseller.",
         "status":1
      }
   ]
}
 Output (XML)
<unsuspendreseller>
   <output>
      Changing shell for username. Shell changed. Unlocking password for user username. passwd: Success Unsuspending email account logins for username.tld .... Done [2014-11-26 15:48:19 -0600] warn [unsuspendacct] Failed to regenerate list using savelist: Importing savelist... Running savelist.savelist()... Loading list /usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld (locked) Traceback (most recent call last): File "/usr/local/cpanel/3rdparty/mailman/bin/withlist", line 299, in <module> main() File "/usr/local/cpanel/3rdparty/mailman/bin/withlist", line 277, in main r = do_list(listname, args, func) File "/usr/local/cpanel/3rdparty/mailman/bin/withlist", line 195, in do_list m = MailList.MailList(listname, lock=LOCK) File "/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py", line 128, in __init__ self.Lock() File "/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py", line 165, in Lock self.Load() File "/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py", line 663, in Load dict, e = self.__load(file) File "/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py", line 628, in __load fp = open(dbfile) IOError: [Errno 13] Permission denied: '/usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld/config.pck' at /usr/local/cpanel/Cpanel/Mailman/ListManager.pm line 34 Cpanel::Mailman::ListManager::__ANON__() called at /usr/local/cpanel/Cpanel/AccessIds.pm line 105 Cpanel::AccessIds::__ANON__() called at /usr/local/cpanel/Cpanel/ForkSync.pm line 122 Cpanel::ForkSync::__ANON__() called at /usr/local/cpanel/Cpanel/ForkSync.pm line 46 Cpanel::ForkSync::try {...} () called at /usr/local/cpanel/Cpanel/CPAN/Try/Tiny.pm line 119 eval {...} called at /usr/local/cpanel/Cpanel/CPAN/Try/Tiny.pm line 108 Cpanel::CPAN::Try::Tiny::try(CODE(0xa760130), Try::Tiny::Catch=REF(0xa75ac18)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 51 Cpanel::ForkSync::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 36 eval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 36 Cpanel::ForkAsync::do_in_child(CODE(0xa73a0f4)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 56 Cpanel::ForkSync::new('Cpanel::ForkSync', CODE(0xa760450)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 125 Cpanel::ForkSync::do_in_child(CODE(0xa760464)) called at /usr/local/cpanel/Cpanel/AccessIds.pm line 108 Cpanel::AccessIds::do_as_user_group('mailman', undef, CODE(0xa75fbe0), 'mailman', CODE(0xa75fbe0)) called at /usr/local/cpanel/Cpanel/AccessIds.pm line 70 Cpanel::AccessIds::do_as_user('mailman', CODE(0xa75fbe0)) called at /usr/local/cpanel/Cpanel/Mailman/ListManager.pm line 51 Cpanel::Mailman::ListManager::regenerate_list('/usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld') called at /usr/local/cpanel/scripts/unsuspendacct line 213 scripts::unsuspendacct::run('username') called at /usr/local/cpanel/scripts/unsuspendacct line 35 Unsuspending websites... Unsuspending FTP accounts... Updating FTP passwords for username FTP password files updated. FTP vhost passwords synced username's account is now active Unsuspending mysql users username's account has been unsuspended Changing shell for noftp. Shell changed. Unlocking password for user noftp. passwd: Success Unsuspending websites... Unsuspending FTP accounts... Updating FTP passwords for noftp FTP password files updated. FTP vhost passwords synced noftp's account is now active Unsuspending mysql users noftp's account has been unsuspended
      </output>
   <result>
      <status>1</status>
      <statusmsg>Finished unsuspending reseller.</statusmsg>
   </result>
</unsuspendreseller>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid reseller username on the server.username

Returns

ReturnTypeDescriptionPossible valuesExample
outputstringOutput from the function's action.

One or more string values.

Note:

This output may contain HTML. 

 Click to view...
Changing shell for username.\nShell changed.\nUnlocking password for user username.\npasswd: Success\nUnsuspending email account logins for username.tld .... Done\n[2014-11-26 15:50:33 -0600] warn [unsuspendacct] Failed to regenerate list using savelist: Importing savelist...\nRunning savelist.savelist()...\nLoading list /usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld (locked)\nTraceback (most recent call last):\n  File \"/usr/local/cpanel/3rdparty/mailman/bin/withlist\", line 299, in <module>\n    main()\n  File \"/usr/local/cpanel/3rdparty/mailman/bin/withlist\", line 277, in main\n    r = do_list(listname, args, func)\n  File \"/usr/local/cpanel/3rdparty/mailman/bin/withlist\", line 195, in do_list\n    m = MailList.MailList(listname, lock=LOCK)\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 128, in __init__\n    self.Lock()\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 165, in Lock\n    self.Load()\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 663, in Load\n    dict, e = self.__load(file)\n  File \"/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py\", line 628, in __load\n    fp = open(dbfile)\nIOError: [Errno 13] Permission denied: '/usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld/config.pck'\n at /usr/local/cpanel/Cpanel/Mailman/ListManager.pm line 34\n\tCpanel::Mailman::ListManager::__ANON__() called at /usr/local/cpanel/Cpanel/AccessIds.pm line 105\n\tCpanel::AccessIds::__ANON__() called at /usr/local/cpanel/Cpanel/ForkSync.pm line 122\n\tCpanel::ForkSync::__ANON__() called at /usr/local/cpanel/Cpanel/ForkSync.pm line 46\n\tCpanel::ForkSync::try {...} () called at /usr/local/cpanel/Cpanel/CPAN/Try/Tiny.pm line 119\n\teval {...} called at /usr/local/cpanel/Cpanel/CPAN/Try/Tiny.pm line 108\n\tCpanel::CPAN::Try::Tiny::try(CODE(0x9bdd234), Try::Tiny::Catch=REF(0x9bd7d1c)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 51\n\tCpanel::ForkSync::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 36\n\teval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 36\n\tCpanel::ForkAsync::do_in_child(CODE(0x9bb71a8)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 56\n\tCpanel::ForkSync::new('Cpanel::ForkSync', CODE(0x9bdd554)) called at /usr/local/cpanel/Cpanel/ForkSync.pm line 125\n\tCpanel::ForkSync::do_in_child(CODE(0x9bdd568)) called at /usr/local/cpanel/Cpanel/AccessIds.pm line 108\n\tCpanel::AccessIds::do_as_user_group('mailman', undef, CODE(0x9bdcce4), 'mailman', CODE(0x9bdcce4)) called at /usr/local/cpanel/Cpanel/AccessIds.pm line 70\n\tCpanel::AccessIds::do_as_user('mailman', CODE(0x9bdcce4)) called at /usr/local/cpanel/Cpanel/Mailman/ListManager.pm line 51\n\tCpanel::Mailman::ListManager::regenerate_list('/usr/local/cpanel/3rdparty/mailman/lists/alist_username.tld') called at /usr/local/cpanel/scripts/unsuspendacct line 213\n\tscripts::unsuspendacct::run('username') called at /usr/local/cpanel/scripts/unsuspendacct line 35\nUnsuspending websites...\nUnsuspending FTP accounts...\nUpdating FTP passwords for username\nFTP password files updated.\nFTP vhost passwords synced\nusername's account is now active\nUnsuspending mysql users\nusername's account has been unsuspended\n\nChanging shell for noftp.\nShell changed.\nUnlocking password for user noftp.\npasswd: Success\nUnsuspending websites...\nUnsuspending FTP accounts...\nUpdating FTP passwords for noftp\nFTP password files updated.\nFTP vhost passwords synced\nnoftp's account is now active\nUnsuspending mysql users\nnoftp's account has been unsuspended\n

result

array of hashes

An array of hashes of function output.

This hash includes the status and statusmsg returns.

 

status

Boolean

Whether the function succeeded.

The function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the  result hash.

  • Finished unsuspending reseller.
  • An error message.
Finished unsuspending reseller.