Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    9

    Default Suspend Multiple Accounts

    Hi!

    I need to know if exist any way to suspend multiple accounts from WHM?

    If not, how can I suggest the idea to the CPanel development team?

    Thanks!

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by EstebanC View Post
    Hi!

    I need to know if exist any way to suspend multiple accounts from WHM?

    If not, how can I suggest the idea to the CPanel development team?

    Thanks!
    This functionality is not currently available in the WHM interface. There is already a feature request for this functionality in our official feature request system that you can vote on:

    http://bugzilla.cpanel.net/show_bug.cgi?id=2564

  3. #3
    Member
    Join Date
    Nov 2005
    Posts
    58

    Default

    You should be able to do this via SSH, however I can't say that I've ever tried.

  4. #4
    Member shital's Avatar
    Join Date
    May 2007
    Posts
    11

    Default

    Take your list of users that need to be suspended.

    Yo can write a little shell script i.e.

    pico test1.sh

    add the following lines:

    /scripts/suspendacct user1
    /scripts/suspendacct user2
    .
    .
    .
    .
    .
    Then save and change file permission to 755 run the file.

    **NOTE: Replace "user1, user2, etc" with the actual usernames.

  5. #5
    Member
    Join Date
    Jun 2003
    Posts
    55

    Default Perl script to see, suspend or unsuspend

    Put the text into a text file like resellersuspend.pl , then chmod u+x resellersuspend.pl , then run with the reseller cpanel username and -what, -go or -unsuspend. -what is to see what accounts it is to suspend without doing anything, just to check the script is going to do the right thing before pulling the trigger...

    #!/usr/local/bin/perl

    @ARGV == 2 || die "usage: $0 reseller (-what|-go|-unsuspend)\n";

    $reseller = shift(@ARGV);
    $what = shift(@ARGV);

    $infile = '/etc/trueuserowners';
    open(INF,"<$infile") || die "cannot open $infile\n";
    @lines = <INF>;
    close(INF);

    @lines = grep(/\:\s$reseller$/,@lines);
    chomp(@lines);

    foreach $line (@lines){
    ($acct,$reseller) = split(/\:/,$line);
    print "/scripts/suspendacct $acct\n";

    if($what eq "-go"){
    system("/scripts/suspendacct $acct");
    }
    elsif($what eq "-unsuspend"){
    system("/scripts/unsuspendacct $acct");
    }
    }

Similar Threads & Tags
Similar threads

  1. Need Multiple Suspend/Unsuspend Feature
    By isputra in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 08-18-2009, 10:33 AM
  2. multiple suspend
    By caeos in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-20-2009, 01:44 PM
  3. Accounts over quota | suspend | non-suspend
    By eagle in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-25-2008, 12:55 PM
  4. How TO: Suspend Accounts when Accounts over their Quota ?
    By Jedia in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 09-08-2004, 12:22 PM
  5. Suspend accounts?
    By wimp in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-22-2003, 05:54 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube