Samba user quota implementation question
Krishna Harathi
krishna.harathi at storagecraft.com
Wed May 27 19:42:27 UTC 2020
Our OneXafe FS supports share/fs level quota using smb.conf “set quota command” and “get quota command”.
We are currently extending support to user-level quotas using the same interface, when Samba smbd is an AD DC member.
Setting user quota from a windows client is working as expected. But once quota is set, none of the users are listed in the quota’s pop-up window, so cannot delete or modify quota properties. Moreover, creating a new quota entry for the same user is generating a “quota entry already exists for this user” error.
By tracing get/set requests to our file server, I see that our FS server is receiving a get request for Samba for every user entry in the local password file, but none for the UID of the DC member user. But I do see a default quota get request for the group GID.
The problem seems to be that the get/set command interface does not obviously support a “list” user quota api to the hosting FS.
Questions on this – We can post and manage user entry (host-local uid/gid) corresponding to the DC user sid/gid whenever a “set user quota” is received. I did verify that when an entry is made manually, windows user quota workflow behaves as expected. Is the problem assumption correct and is this a way to implement? Is there a better way, given the constraints?
We are using Samba 4.7.11 patched with https://bugzilla.samba.org/show_bug.cgi?id=13553#c17 fix for 4.7.
Any help is this issue is much appreciated in advance.
Regards.
Krishna Harathi
More information about the samba-technical
mailing list