Problem: samba share recycle bin does not work

Problem:

Samba share recycle bin does not work.

Digression

You can enable the recycle bin for shares in the share configuration:

cat /etc/samba/shares.conf.d/samba
[samba]
path = /srv/samba/projekte
comment = univention-test3
[...]
recycle:repository = Papierkorb
recycle:versions = Yes
recycle:keeptree = True

udm shares/share list | awk -F ":" '$1 ~ "(^DN|sambaCustomSettings)"'
DN: cn=samba,cn=UCS-1.schein.ig,cn=shares,dc=schein,dc=ig
  sambaCustomSettings: recycle:repository = Papierkorb
  sambaCustomSettings: recycle:versions = Yes
  sambaCustomSettings: recycle:keeptree = True

Solution:

The univentionShareSambaName is specified incorrectly here.

dn: cn=Projekte,cn=UCS-1.schein.ig,cn=shares,dc=schein,dc=ig
univentionShareHost: UCS-1.schein.ig
univentionShareSambaName: samba
univention-ldapsearch -LLL -b cn=Projekte,cn=UCS-1.schein.ig,cn=shares,dc=schein,dc=ig
univentionShareSambaName
dn: cn=Projekte,cn=UCS-1.schein.ig,cn=shares,dc=schein,dc=ig
univentionShareSambaName: samba

The configuration file (which is incorrect and has not been regenerated since December 2023) contains the following comment:

[Projects]
# 20231220dk:

Presumably the configuration has been manually edited here in the past and the LDAP entry changed
So the correct one is

cat /etc/samba/shares.conf.d/samba
[samba]
path = /srv/samba/projekte
comment = univention-test3
msdfs root = no
writeable = yes
browseable = yes
public = no
dos filemode = no
hide unreadable = no
create mode = 0777
directory mode = 0777
force create mode = 0777
force directory mode = 0777
locking = 1
strict locking = Auto
oplocks = 1
level2 oplocks = 1
fake oplocks = 0
csc policy = manual
nt acl support = 1
inherit acls = 0
vfs objects = acl_xattr recycle
inherit owner = no
inherit permissions = no
<strong>recycle:repository = Papierkorb
recycle:versions = Yes
recycle:keeptree = True</strong>

but was not “used”.

Investigation:

The used configuration was the one with the “Projekte” Name

~# less /etc/samba/shares.conf.d/Projekte 
[Projekte]
# 20231220dk:
path = /srv/samba/projekte
msdfs root = no
writeable = yes
browseable = yes
public = no
dos filemode = no
hide unreadable = no
create mode = 0666
directory mode = 0777
force create mode = 00
force directory mode = 00
locking = 1
strict locking = Auto
oplocks = 1
level2 oplocks = 1
fake oplocks = 0
csc policy = manual
nt acl support = 0
inherit acls = 0
#vfs objects = acl_xattr
inherit owner = no
inherit permissions = no
map acl inherit = no
Mastodon