Skip to main content
LPIC-3 Exam 303

LPIC-3 300 smbcquotas

LPIC-3-300smallWorking with our SAMBA server on CentOS 6.5 we can look to see how we can implement users quotas via the smbtools. We still need to have quotas turned on on our mount options for the file-system that is shared out but smbcquotas will allow for the quotas to feedback correctly via the SMB protocol as will as managed though the smbtools.

In the worked example in the video we have the /repo directory shared out and this is mounted individually in the /etc/fstab so we effect mount option on this disk.

  1. Edit the /etc/fstab add the mount options usrjquota=aquota.user,jqfmt=vfsv0
  2. Unmount and mount again from the fstab: umount /repo ; mount -a
  3. Create quota database:
    quotacheck -cmuva
  4. Enable quota checking quotaon /repo
  5. Show quota flags : smbcquotas -F //127.0.0.1/repo
  6. Enable a quota for the user
    smbcquotas -S UQLIM:fred:10000000/20000000 //127.0.0.1/repo
    The limit is set for the user fred to 10M as a soft limit and 20M as a hard limit. The numbers are in bytes.
  7. List quotas smbcquotas -L //127.0.0.1/repo

To unset a quota for a user use the value of -1. Soft limits ca be exceeded for the grace period which defaults to 7 days, hard limits cannot exceeded.