Samba4 and Sonos

I ran to the problem after upgrading my system to samba 4 I can not connect to the smb share with my Sonos system.
After some research:

The update broke SMBv1 backwards-compatibility which Sonos still uses. Apparently fixing it would make a lot of their older speaker obsolete. --> SONOS needs to find another way here!
This is a very old clients which doesn't support NTLMv2

To have NTLMv1 working with samba 4 you have to edit the Template in Luci (file /etc/samba/smb.conf.template) which will write this into the /etc/samba/smb.conf when you save it. Don't edit the /etc/samba/smb.conf directly it will be overwritten by the template again!

just add this line to the global section

ntlm auth = yes

It should look like this now

netbios name = |NAME|
interfaces = |INTERFACES|
server string = |DESCRIPTION|
unix charset = |CHARSET|
workgroup = |WORKGROUP|
ntlm auth = yes

This will change your security settings!! I have not found any other way to fix this issue. If this is a router on your network it should be ok. Don't do this on your main router if possible that can be accessed from the outside.

Does anybody know or think about a better way to do this without risking the security of your system?

I added some check a while ago, that will preserve a custom /etc/samba/smb.conf aka it check's if its a file vs link. So you can copy a real smb.conf into /etc/samba and all the template logic will be ignored.