Announcement

Collapse
No announcement yet.

cPanel: Suspend, Un-suspend and List Suspended Accounts via Command Line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cPanel: Suspend, Un-suspend and List Suspended Accounts via Command Line

    How to Suspend, Un-suspend and List Suspended Accounts via Command Line :

    1. To Suspend an Account -:
    Code:
    /scripts/suspendacct user-name


    2. To Suspend an Account and Prevent Reseller’s Un-suspension-:
    Code:
    /scripts/suspendacct user-name "Reason" 1
    (Here 1 Locks the Account and it Can’t be Un-suspended by the Reseller)



    3. To Un-suspend an Account -:
    Code:
    /scripts/unsuspendacct user-name



    4. To List Suspended Accounts -:
    Code:
    /var/cpanel/suspended/


    Bonus: Suspend all cPanel Accounts at once via Command line
    Note: Waring use at you own risk have not tested
    Code:
    for username in `cat /etc/userdomains | awk {'print $2'} | grep -v nobody | sort -n | uniq`;do /scripts/suspendacct $username;done
Working...
X