Answered

SAMBA v4.15.5 file server stopped working for Sonos connect:amp


Badge
  • Trending Lyricist I
  • 12 replies

once i upgraded the OS of my linux box its SAMBA service is not recognized anymore by my Sonos connect:amp device - while the same setup worked just fine for years.  no browsing in the directory tree, no music library update, no playing of any music files, nor mp3 nor flac…

the crucial difference i assume is in the SAMBA version, now at 4.15.5 which does not come anymore with the ancient SMB1/NT1 protocol the connect:amp relies on.  is there anybody out there that got the connect:amp work with a modern SAMBA version > 4.11 ?

here a few elements in my smb.conf file that helped in the past to make this work :

client min protocol = NT1
server min protocol = NT1
ntlm auth = ntlmv1-permitted
follow symlinks = yes
wide links = yes
unix extensions = no

any help is greatly appreciated !

icon

Best answer by pisti 6 May 2022, 17:40

View original

26 replies

Userlevel 7
Badge +17

Hi @pisti 

Welcome to the Sonos Community!

We added SMB2/3 support late last year, but on S2 systems only. Thankfully, although your Sonos system is on S1, it is S2 compatible - please update your system to S2 and you will be able to use SMB2/3, though version 4 is still unsupported. To update, please start at our Sonos S2 Overview page.

Once you’ve updated to S2, if you change each “NT1” in your smb.conf file to “SMB2” and restart the SAMBA service, things should work a bit better. You may need to remove your old share from Sonos and add it again, but hopefully not.

I think you’ll be safe to remove the “ntlm auth = ntlmv1-permitted” line, but don’t quote me on that.

I hope this helps.

client min protocol = SMB2

server min protocol = SMB2

follow symlinks = yes

wide links = yes

unix extensions = no

 

Badge

wow, dear Corry, i was very happy to read your reply !

now, unfortunately, it turns that my connect:amp device will not be compatible with S2 as i had bought it way back in 2012, making it belong to the 1st generation SONOS league and hence incompatible with S2, sniff.

i guess, in this case, my only option to make this SAMBA fiesta work is to try re-using an old QNAP NAS and export music files via its QNAP protocols that hopefully still support SMB1 - or, alternatively, get a new Amp, gulp.

i will get back to this audience once successful...

Userlevel 7
Badge +21

You could always use a NAS to SMB v1 gateway. Here it is running on a Raspberry Pi but it will work on any SMB v1 server.

 

SMB v1 Gateway  https://stan-miller.livejournal.com/357.html

Badge

dear Stanley, thank for your elegant suggestion - though i decided, for time reasons,  to resort to my existing QNAP NAS and use its spinning disks for storage of my music files.  i tried to downgrade SAMBA on my upgraded linux server to v4.6 but the S1 SONOS app and S1 OS on the first generation connect:amp both adamantly refused to connect to the linux samba service.  sadly, because i have SSD drives on that linux server, while i hate to boot those precious 20TB spinning backup disks just for listening a bit of music.   anyway, that’s where we are currently.  i am much more familiar with NFS services, while SAMBA i used and solely use for this SONOS fiesta...

thank-you for your inputs, Corry and Stanley.

Userlevel 7
Badge +21

I understand time and simplicity issues and the frustrations folks are facing with Sonos and Samba. That is why I built and shared both the SMB v1 gateway and a SMB v1 server.

Build once, never update, just let them run forever tucked out of sight somewhere.

Live Journal: Stan  https://stan-miller.livejournal.com/

 

I’m using the server today, plugged an old SSD into a SATA-USB converter cable ($10) and it is happily serving my Sonos needs.

At some point I’ll swap over to using the gateway to my main NAS. I do not run Samba on it, any version, so I need to connect to it via NFS and share out a Sonos compatible connection. This will save me about 5 Watts of power and a tiny bit of space so I should do it. It will also save a couple minutes when I (rarely) add a new item to the library.

Badge

dear Stanley, you definitely caught my interest, nfs xfs are terms i am familiar with.  i guess a raspberry pi comes with ubuntu or alike OS while i am a hardcore slackware guy - but as long as there are just simple CLI & script moves to do i think i will manage.

same here, i rarely add flac files to the library - though i still have some 600 LPs left to digitize,  while a first round of 200 LPs’ flac files (and gazillion other high-res FLACs) i play already regularly from my venerable SONOS connect:amp and its associated SMB1 server...

Userlevel 7
Badge +21

The Pi foundation offers several operating systems and versions: 

https://www.raspberrypi.com/software/operating-systems/

Many other distributions have a Pi version too.

https://www.fossmint.com/operating-systems-for-raspberry-pi/

 

Looking at this list I run BSD on a couple boxes, hoping to find time to try it on one of my Pi. Same for OpenSuse, we use it as our desktops and server so a Pi version might be interesting.

Userlevel 7
Badge +17

Hi @pisti 

When I first looked up your account, the page I was on told me you had a S2-compatible system, but were on S1.

That page has now apparently changed.  Apologies for the confusion, and for getting your hopes up! I’m not sure what happened there.

Another option for getting your music onto your S1 system would be to install a Plex server on your Linux box, and add the Plex service to your Sonos system. You’ll need to set up an account with Plex, but they have a free tier.

I hope this helps.

Badge

wow ! now i suddenly see several options how to overcome my/our SMB1 problem : Raspberry, then Plex, a VM with SMB1, or simply installing an old OS on an old server+SSD+SMB1 - thank you for all your advice, Stanley and Corry.  to me it boils down to choosing an avenue that costs me the least amount of effort (i am bizi enough with other software projects).  so, perhaps PLEX is the easiest way to go as i just found a Slackware 150 compatible repository for PLEX - which i hope will even work as advertised.

soon more... 

Badge

well, well - the PLEX avenue was perhaps a bit to good to be true ! 

in order to be able to browse through my 1700 music directories with some 17,000 FLAC files i would need to upgrade to PLEX-Pass which comes with a monthly fee…  their browser-based PLEX software seemed to work otherwise surprisingly flawlessly, but without offering a ‘Folder’ view it renders itself into a somewhat useless tool for music enthusiasts with large music file collections, unfortunately.

so, we continue our SMB1 odyssey - and will try the VirtualBox/oldOS/oldSAMBA/SMB1 route, sigh.

i prefer for now to go with a software solution instead of old/new hardware, that’s why i refrain from using  a Raspberry or an oldServerBox solution.

soon more...

Userlevel 7
Badge +17

Hi @pisti 

I’ve used Plex for years and was not aware of that limitation - I guess I don’t have enough music! Apologies for once again getting your hopes up!

It looks like you are right and @Stanley_4’s suggestion of the SMB gateway will be the way to go, though I have never looked into it myself.

One more idea, as you’re set on not adding hardware - if you were to set up a Virtual Machine on Linux that ran Windows, you could install the Sonos app there which prefers to use HTTP rather than SMB, utilising the Sonos Library Service installed with the app. I can’t say for sure that it would work - it may well take a bit of fiddling, as well as being an inefficient use of disk space - but in theory I don’t see why not. Experience with VMs would definitely help. Hopefully, the gateway solution will be tidier.

I wish you luck.

Edit: You might want to check this thread (music needn’t be stored on the Android device, just on a local UPnP server):

 

Badge

just as update - still no simple solution found for my SMB1 problem, working on it…

still, here a question to the SONOS OS developers : is there no way to install a read-only NFS client functionality in the S1 (or S2 as well) kernel ?  that would really really be a big favour to the linux SONOS community.  it’s so much easier to deal with NFS than with SAMBA.  i don’t think NFS requires much space nor resources, right ?  i anyway assume that the SONOS OS uses some form of embedded linux kernel.

Userlevel 7
Badge +17

Hi @pisti

You are correct - our firmware is based on Linux, so I don't think that would be too difficult as NFS is as much a part of Linux as having a local file system. Whether it would be implemented, I have no idea - it may have been considered already. Windows can’t add NFS shares natively so that would make it difficult to Browse to the share in the desktop controllers - advanced users only, I guess.

It could be helpful for a non-insignificant number of people though - good idea!

I recommend you start a new topic here on the Community, making NFS a feature request in it.

Badge

thank you, Corry, for your suggestion - here my new feature request for adding NFS as new data sharing protocol to S1/S2.

Badge

here the link to the my feature request (the previous one above is not right)...

Userlevel 7
Badge +21

I wanted NFS access to my NAS for my Sonos music so I built an NFS to SMB gateway it was quick, easy and fairly cheap. I’m hoping to not need it some day but until then…

This is on a Pi but you can do it on any Unix derived OS that includes Samba.

SMB v1 Gateway  https://stan-miller.livejournal.com/357.html

Userlevel 7
Badge +17

Hi @pisti 

I’ve been given a pointer. Please try adding 

unix extensions = no

to your smb.conf file.

I hope this helps.

Badge

very kind of you, dear Corry, thank you !  now, i have used this option “unix extensions = no” in the past, and even last month, but without success.  i will try again tonight at home, as my smb.conf file changed somewhat following Stanley’s example on the web, and insert this option which may make it then work, who knows… 

although nothing changed for years in my setup regarding the SSD drive where i keep all music files i will nevertheless check if ownership and permission settings look fine.  that may be a last thing to look into, on the UNIX part at least.   the only thing that changed here early this year is an OS upgrade.

like you and Stanley said, a Raspberry solution may help here, or a separate server with an old Slackware 14.2 version installed.  the 2nd option means perhaps less effort for me.

what annoying problems.  will keep you posted !

Userlevel 7
Badge +17

Hi @pisti 

My colleague reports from his testing that access on his drive via Sonos is switching off and on with the removal and addition of that line, so it’s worth confirming, I think.

Please also try adding

ntlm auth = yes

and try with and without 

follow symlinks = yes

wide links = yes

Please make sure that this is all done in the [Global] section of the file.

If this works, it might make up for me foolishly suggesting you make a feature request for S1, which, as was rightly pointed out on the thread, isn’t going to happen. For S2, it is at least feasible.

 

Edit: “wide links = yes” seems to be the issue. “follow symlinks = yes” shouldn’t be a problem.

https://www.samba.org/samba/docs/current/man-html/vfs_widelinks.8.html

Badge

no luck, sigh...tried gazillions of variations, played with all the SMB options mentioned here earlier, tried to mount SMB via linux cli, and so on.  nothing works.  i am a hardcore unix user/coder for 29 years but samba is just not my domain !

  1. i am wondering how to get hold of a *complete* example smb.conf file, best for passwordless access of a directory tree with NT1/SMB1, that proven works with SONOS ? 
  1. then the instructions what ownership & permission settings to apply to the directory tree in question.
  1. last i would like to see the corresponding three lines that need to be entered in the SONOS S1 App under Settings-System-Music Library-Music Library Setup-Add Shared Music Folder such as //IP/PATH;username(empty?);pswd(empy?)

as said, i used my SONOS connect:amp for the last 10 years with music libraries stored on Slackware linux or on the QNAP NAS, and things worked fine - though each upgrade brought its own SAMBA quirks.

a last avenue for me before starting to play with Raspberries and other old-OS linux boxes, could be to install a 1TB SSD in my QNAP NAS and use its inelegant GUI and associated services to serve my 17K music files...

Userlevel 7
Badge +17

Hi @pisti 

Sorry to hear that - I thought we were on to something.

  1. i am wondering how to get hold of a *complete* example smb.conf file, best for passwordless access of a directory tree with NT1/SMB1, that proven works with SONOS ? 

As far as I am aware, if you delete the smb.conf file, a new default one will be generated by the SAMBA service upon restart. An uninstall/delete/reinstall would certainly do it. You’d need to add the share paths to the conf again, of course.

I’d give you my own conf file if I actually had a S1 system and knew it would work for you, but I think regenerating it and adding only the shares, the min/max values and ntlm would do the trick. Edit: A helpful colleague of mine with S1 just tested this and found it to work! His [Global] section looks like this:

log file = /var/log/samba/%m.log
   log level = 10
   unix extensions = no
   follow symlinks = yes  

# Security
   client max protocol = SMB3
   client min protocol = NT1
   server max protocol = SMB3
   server min protocol = NT1
   ntlm auth = yes

#======================= Share Definitions =======================

[example1]
writeable = no
path = /mnt

 

Edit: It seems to be important to have “unix extensions = no” included

  1. then the instructions what ownership & permission settings to apply to the directory tree in question.

Sonos requires read access, so the user you pick to be the SMB user in the conf needs those permissions on the parent shared folder and all children. I tend to use the permission octal of 775, for non-Sonos-related access. The SMB user configured in the conf file needs to be in the same group as the main user ID that is used to put the files there in the first place, or to be the same actual user.

  1. last i would like to see the corresponding three lines that need to be entered in the SONOS S1 App under Settings-System-Music Library-Music Library Setup-Add Shared Music Folder such as //IP/PATH;username(empty?);pswd(empy?)

The first would be //server/share (if IP is static it is probably more reliable than NETBIOS name)

User and password are needed if you set up your SMB server to require them - this is probably for the best.

as said, i used my SONOS connect:amp for the last 10 years with music libraries stored on Slackware linux or on the QNAP NAS, and things worked fine - though each upgrade brought its own SAMBA quirks.

a last avenue for me before starting to play with Raspberries and other old-OS linux boxes, could be to install a 1TB SSD in my QNAP NAS and use its inelegant GUI and associated services to serve my 17K music files...

If that’s something you already have, it’s better than spending more money, I guess. I’d try it.

I hope this helps.

Badge

to everybody who tried to help me here with my SMB1/SONOS problem.  i somehow got this issue resolved, it’s now QNAP that speaks to my connect:amp - see here under LinuxQuestions -  so, i took the easy route, for the moment at least…

thank you for your efforts and time !

 

Userlevel 7
Badge +17

Hi @pisti 

That’s great to hear - thanks for updating the thread!

Userlevel 2

Please SONOS consider upgrading SONOS S1 firmware to support SMB2 protocol.

I can’t use my Play 5 anymore : it can’t access my music library while any other device can.

Userlevel 7
Badge +17

Hi @pini 

Please SONOS consider upgrading SONOS S1 firmware to support SMB2 protocol.

This isn’t technically possible as SMB2/3 support requires a build of the Linux kernel that our legacy devices simply do not have enough resources to run - this is one reason why models have been revised over the years. For your Play:5 (Gen1) to be able to access your network share, the share must be SMBv1.

I hope this helps.

 

Reply