[Samba] Bulk smbcacls calls

Peter Flood info at whywouldwe.com
Fri Nov 29 02:50:14 MST 2013


Thanks Andrew. I hadn't noticed the python code in the repo, I'm pretty
sure we'll be able to extract something that meets our needs.


On 29/11/2013 07:16, Andrew Bartlett wrote:
> On Thu, 2013-11-28 at 15:00 +0000, Peter Flood wrote:
>> I want to get ACLs (output similar to that of smbcacls) for a *lot* of
>> files (potentially millions). I can only process about 10 files per
>> second when running the command (`smbcacls -U ...` via a Python
>> wrapper), I'm looking for a faster way.
>>
>> Does anyone know any libraries or other commands that could help me?
>>
>> Failing that, I assume that much of the time taken is spent on
>> authenticating the user/pw for each request. Would it be possible to
>> write something that keeps the connection so that multiple requests can
>> be made without reauthenticating (I'm not familiar with how
>> LDAP/AD/Samba works)? I have looked at the source of smbcacls but
>> nothing jumped out at me.
> See the code in python/samba/netcmd/gpo.py that sets a remote ACL for
> GPOs.  This could be called from your own script, avoiding the
> connection cost.
>
> Otherwise, make sure you authenticate with kerberos, as this will be
> much faster, even if you connect per file with smbcacls.
>
> Andrew Bartlett
>



More information about the samba mailing list