Quota Howto: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
Try http://www.debianhelp.co.uk/Webmin.htm | Try http://www.debianhelp.co.uk/Webmin.htm | ||
HINT: Create a "prototype" user, compile a list of users who will have | |||
the same quotas as the prototype, and do | |||
edquota -p protouser `cat userlist` | |||
repquota / | |||
is used to report list all the quota's | |||
Cobalt products, manual Quota setting, semi-automatic ;) | Cobalt products, manual Quota setting, semi-automatic ;) |
Revision as of 13:08, 19 September 2007
Debian
Try http://www.debianhelp.co.uk/Webmin.htm
HINT: Create a "prototype" user, compile a list of users who will have the same quotas as the prototype, and do
edquota -p protouser `cat userlist`
repquota /
is used to report list all the quota's
Cobalt products, manual Quota setting, semi-automatic ;)
Prerequisites:
=
QuotaTool : http://devel.duluoz.net/quotatool/ Compile this and keep it in your path on the Cobalt product in question.
Getting into postgres:
cat /etc/cobalt/.meta.id <- Copy the alfanumeric output. It's the postgress PW. psql cobalt -u user: <admin> password: <middleclick> (Paste)
Export Quota information for Virtual Hosts:
\o /home/sites/home/users/admin/sites.res select name,quota from vsite;
Export Quota information for users:
\o /home/sites/home/users/admin/users.res select name,quota from users;
Using this information:
cd ~admin cat sites.res | sed -e s#name.*\$##g -e s#--.*\$##g -e s#\(.*\$## -e s#\ ##g > sites.quota cat users.res | sed -e s#name.*\$##g -e s#--.*\$##g -e s#\(.*\$## -e s#\ ##g > users.quota export sites=`cat sites.quota` export users=`cat users.quota` export PATH=.:$PATH for a in $sites ; do
export group=`echo $a | cut -d\| -f1` ; export quota=`echo $a | cut -d\| -f2` ; quotatool -g "$group" -bq "$quota"M -l "$quota"M /home
done for a in $users ; do
export name=`echo $a | cut -d\| -f1` ; export quota=`echo $a | cut -d\| -f2` ; quotatool -u "$name" -bq "$quota"M -l "$quota"M /home
done