[Samba] Samba recycle bin configuration

Rowland Penny rpenny at samba.org
Mon Aug 6 09:25:02 UTC 2018


On Sun, 5 Aug 2018 16:32:57 -0500
Ivan Rojas via samba <samba at lists.samba.org> wrote:

> Can not the configuration of the recycle bin be done with the active
> directory? I did tests, deleting but it only gives me the information
> of a user that had deleted a folder, what other parameters are
> necessary so that they are shown of all the users who deleted some
> file or folder?
> 
> ----------------
> [TI]
>         path = /opt/sistemas
>         read only = no
> # Recycle Bin
>         vfs objects = recycle full_audit
>         recycle:repository = /opt/recycle/recycle_TI/%u/%m
>         recycle:versions = Yes
>         recycle:keeptree = Yes
>         recycle:touch = yes

Your users are connecting to the share 'TI' and are then deleting
folders & files. You are telling the recycler to put the deleted item
in:

/opt/recycle/recycle_TI/%u/%m

This means that anything the user deletes will go into that path, '%u'
is the users name and '%m' is the clients Netbios name

So if user 'rowland' on the PC 'win7-pc', in the domain 'DOMAIN',
deletes the file 'test1.txt', it will end up here:

ls -la /opt/recycle/recycle_sistemas/DOMAIN\rowland/win7-pc/

-rw-r--r-- 1 DOMAIN\rowland DOMAIN\domain users   14 Aug  6 10:06
test1.txt

NOTE: if you only want the username instead of 'DOMAIN\username', use
'%U' instead of '%u'

Rowland



More information about the samba mailing list