The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple Terminate accounts

Discussion in 'General Discussion' started by hosteurolive, Mar 14, 2007.

  1. hosteurolive

    hosteurolive Member
    PartnerNOC

    Joined:
    Jun 5, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    hi all
    I need your help for a little script

    I found this one but not complete:


    #!/bin/sh

    cd /var/cpanel/suspended/
    for user in *
    do
    echo y | /scripts/killacct $user
    done
    exit


    I want not remove accounts suspended due to the bandwith limit and I want to keep users from march 2007

    thx for your help
     
  2. nilesh_kolte

    nilesh_kolte Well-Known Member

    Joined:
    Apr 13, 2006
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Pune ,India
    cPanel Access Level:
    Root Administrator
    Use the following script to terminate the accounts.


    for user in `cat list11`
    do
    echo "===================================================="
    echo "Terminating user $user"
    echo y | /scripts/killacct $user
    done
    echo "~~~~~~~~~~~~~~~~D~O~N~E~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

    First create a list of the suspended user which was suspedned before march 2007 and put that user in the file call list11. Create both files in the same location. Like script is located in /home/kill.sh so the list11 should be in /home/

    Good Luck
     
Loading...

Share This Page