In a previous post, you learned how to suspend a Linux user account on your dedicated server. Although this method is effective in shutting down users with shell access, it may not shut off any websites or other unique hosting features that they have. For that you will probably need to suspend their accounts within your hosting control panel. In cPanel, this is very easy to do. Simply follow these instructions.
- Login to cPanel as the administrator
- On the WHM home screen, click “Account Functions”
- Choose “Suspend/Unsuspend an Account”
- Select the account that you want to suspend based on domain or users
- Check the box “Prevent resellers from unsuspending”
- Click “Suspend”
At this point, instead of seeing the users normal site, anyone who visits the user’s website will see a message indicating the account has been suspended. If you want to customize the way this suspended page appears, you can edit it using the Web Template Editor. The good thing about this method of suspending user accounts is that it will also suspend shell access, which means you will not need to suspend the user from the command line as well.
To unsuspend an account, usually after the user has paid a delinquent bill, simply return to the same page, select the user, and click “unsuspend”. cPanel will use the same method of disabling a user’s account that you would use from the command line. This means that the user’s password will be listed as “invalid” until you unsuspend it. It also uses an .htaccess file to redirect site visitors away from the user’s normal web pages. Therefore, you must have .htaccess enabled for it to work.