S
S
speedvm2015-11-20 15:11:58
Active Directory
speedvm, 2015-11-20 15:11:58

How to set quotas for MS AD groups on a samba server?

Good day!
There is a samba server on a windows ad network. With it, personal directories are distributed to users who are subject to quotas. I set up quotas using quotatool: I needed
quotatool -u <user> -b -l <XXXMB> /dev/<device>
to make department catalogs with quotas too. And here a problem arose. Quotas are not set on active directory groups. Tried to do it the same way as for users:
quotatool -g <group> -b -l <XXXMB> /dev/<device>
But the quotas don't work and there is nothing in repquota. Mounting devices for directories is done in the same way:

UUID=... /media/Users ext4 _netdev,errors=remount-ro,acl,user_xattr,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 2
UUID=... /media/Departaments ext4 _netdev,errors=remount-ro,acl,user_xattr,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 2

Samba 4.1.17.
sudo quotacheck -avug -f
quotacheck: Scanning /dev/sdc1 [/media/Users] done
quotacheck: Checked 285 directories and 83 files
quotacheck: Scanning /dev/sdb1 [/media/Departaments] done
quotacheck: Checked 49 directories and 3 files

It's decided.
Suppose the group name is group users.
1. Define a quota for a group:
quotatool -g "group users" -b -l /dev/
2. Assign to the group that owns the directory that will be the OU resource:
chown -R :"group users" /mounted/directory
3. Add to smb.conf for the group resource the line:
force group = "@group users"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question