Changing disk quota for all accounts on a server

morteza

Member
Dec 8, 2009
20
0
51
I was trying to change the disk quota massively for all accounts, setting them all to let's say 200,000MB. Something simple like this can generate a file like /etc/quota.conf, saved as /etc/newquota.conf:

# cd /etc; cat /etc/trueuserdomains |awk '{print $2}'|sort| while read u; do echo "$u=200000" >> newquota.conf; chmod 600 newquota.conf; done

But apparently modifying /etc/quota.conf does not actually change the quota as I checked it from WHM. before running the above, I changed some of /etc/quota.conf entries manually, but it's not shown on WHM. What else should be done to change the quota other than modifying /etc/quota.conf? I appreciate the suggestions or instructions to change the quota for all accounts.
 

bhd

Well-Known Member
Sep 20, 2003
149
2
166
JNB ZA
cPanel Access Level
Root Administrator
Unless you have each account with a different or no package assigned, why not just change the disk quota in the assigned package(s)?
 

morteza

Member
Dec 8, 2009
20
0
51
Unless you have each account with a different or no package assigned, why not just change the disk quota in the assigned package(s)?
Yes that's the point; these accounts are moved from a different platform and have no packages identified by cPanel. On the other hand the accounts had different plans and I cannot change them all to one package on cPanel.
 

morteza

Member
Dec 8, 2009
20
0
51
Thanks to Joshua @ cPanel support, the quota can be changed in shell with /scripts/editquota , something like this will change it to 200000MB for all accounts:

cat /etc/trueuserdomains |awk '{print $2}'|while read u; do /scripts/editquota $u 200000M ; done