Portal Home > Knowledgebase > Articles Database > how can Suspend all Accounts in server


how can Suspend all Accounts in server




Posted by hussain almalki, 07-23-2008, 07:09 PM
hi, I want Suspend all Accounts in my linux server I use WHM Please help Regards, Hussain

Posted by ServerSurgeon George, 07-23-2008, 07:16 PM
You can do that by going into WHM -> Account Functions -> Suspend/Unsuspend an Account

Posted by jalapeno55, 07-23-2008, 08:33 PM
How do you know he has cpanel? Plus if he has a lot of accounts suspending each one individually wouldn't be practical, plus I'm sure he knows how to a suspend an account. Hussain: Are you using cpanel? If so just use a for loop to go through /etc/userdomains and have it run /scripts/suspendacct $username Last edited by jalapeno55; 07-23-2008 at 08:39 PM.

Posted by ServerSurgeon George, 07-23-2008, 08:48 PM
He said he has cPanel(WHM) Please read his post carefully

Posted by jalapeno55, 07-23-2008, 08:54 PM
Oops, you're right, he still wouldn't want to suspend each account one by one. If he doesn't want sites to load, he can just add off to the top of httpd.conf and stop apache Or if he wants the suspended page to appear, he can run this simple command: for username in `cat /etc/userdomains | awk {'print $2'} | grep -v nobody | sort -n | uniq`;do /scripts/suspendacct $username;done



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
big size for a table (Views: 476)