FreeBSD-Quota-Howto  

<< HOWTO-Index

  NEW! Visit my Linux forums!

  This Howto is also available on HowtoForge! If you have also written tutorials, you can publish them there.

Subscribe to FalkoTimme.com Newsletter
and stay informed about my latest HOWTOs and projects.
Email
(If you want to unsubscribe from our newsletter, visit this link.)

FreeBSD-Quota-Howto

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 12/29/2003

This document describes how to enable quota on a FreeBSD system. Please be aware that this document comes without warranty of any kind!

 

1 Compile a New Kernel

First you have to compile/install a kernel that supports quota (not enabled by default) (more information about compiling a new kernel can be found here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html).

cd /usr/src/sys/i386/conf
cp GENERIC MYKERNEL

Edit the file MYKERNEL and add the line

options QUOTA

Then run the following commands:

/usr/sbin/config MYKERNEL
cd ../compile/MYKERNEL

(For FreeBSD version prior to 5.0, use instead:

cd ../../compile/MYKERNEL )

make depend
make
make install

 

2 Enable Quota

Edit the file /etc/fstab and look for the entry, in which the directory /home is mentioned, e.g.

/dev/ad0s1d /home ufs rw 2 2

Add the words userquota and groupquota as follows:

/dev/ad0s1d /home ufs rw,userquota,groupquota 2 2

To enable quota at boot time you have to add the following lines to /etc/rc.conf:

quota_enable="YES"
check_quotas="YES"

Reboot the system:

shutdown -r now

After the reboot run the following commands:

quotacheck -a
quotaon -a

Install the setquota-Tool at last:

pkg_add -r setquota

  NEW! Visit my Linux forums!

  This Howto is also available on HowtoForge! If you have also written tutorials, you can publish them there.

If you find this page useful you can acknowledge your gratitude by making a donation (through PayPal):

<< HOWTO-Index

 
Copyright 2014, Falko Timme. All rights reserved.
     Home  |  News  |  HOWTOs  |  Projects  |  Forums  |  Support  |  About Me   |  Contact Information  |  Site Map